invoke singletons() function to satisfy compiler

master
Stefan Partheymüller 2 years ago
parent b1b8321fa4
commit 701fbfb4db

@ -82,12 +82,12 @@ test "singletons" {
defer reg.deinit();
var pos = Position{ .x = 5, .y = 5 };
reg.singletons.add(pos);
try std.testing.expect(reg.singletons.has(Position));
try std.testing.expectEqual(reg.singletons.get(Position).*, pos);
reg.singletons().add(pos);
try std.testing.expect(reg.singletons().has(Position));
try std.testing.expectEqual(reg.singletons().get(Position).*, pos);
reg.singletons.remove(Position);
try std.testing.expect(!reg.singletons.has(Position));
reg.singletons().remove(Position);
try std.testing.expect(!reg.singletons().has(Position));
}
test "destroy" {

Loading…
Cancel
Save