Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zenith391 committed Oct 30, 2024
1 parent f304a9d commit e3d7f41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ pub fn build(b: *std.Build) !void {
defer examples_dir.close();

const broken = switch (target.result.os.tag) {
.windows => &[_][]const u8{ "osm-viewer", "fade", "slide-viewer", "demo", "notepad", "dev-tools", "many-counters" },
else => &[_][]const u8{"many-counters"},
.windows => &[_][]const u8{ "osm-viewer", "fade", "slide-viewer", "demo", "notepad", "dev-tools" },
else => &[_][]const u8{},
};

var walker = try examples_dir.walk(b.allocator);
Expand Down
2 changes: 1 addition & 1 deletion src/internal.zig
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub fn Widgeting(comptime T: type) type {
const type_info = @typeInfo(@TypeOf(T.init)).@"fn";
const return_type = type_info.return_type.?;
if (comptime type_info.params.len != 1) {
@compileError("no");
@panic("no");
}
if (comptime isErrorUnion(return_type)) {
instance.* = T.init(config) catch @panic("error"); // TODO: better? maybe change return type by making alloc() return an error union?
Expand Down
1 change: 1 addition & 0 deletions src/widget.zig
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ test "widget basics" {

.name = undefined,
.animation_controller = undefined,
.userdata = undefined,
};

try expect(widget.is(TestType));
Expand Down

0 comments on commit e3d7f41

Please sign in to comment.