@@ -74,10 +74,10 @@ test "zflecs.entities.basics" {
7474 const ptr = ecs .get (world , bob , Position ).? ;
7575 print ("({d}, {d})\n " , .{ ptr .x , ptr .y });
7676
77- _ = ecs .set (world , bob , Position , .{ .x = 20 , .y = 30 });
77+ _ = ecs .set (world , bob , Position , .{ .x = 10 , .y = 30 });
7878
7979 const alice = ecs .set_name (world , 0 , "Alice" );
80- _ = ecs .set (world , alice , Position , .{ .x = 10 , .y = 20 });
80+ _ = ecs .set (world , alice , Position , .{ .x = 10 , .y = 50 });
8181 ecs .add (world , alice , Walking );
8282
8383 const str = ecs .type_str (world , ecs .get_type (world , alice )).? ;
@@ -87,11 +87,11 @@ test "zflecs.entities.basics" {
8787 ecs .remove (world , alice , Walking );
8888
8989 {
90- var term = ecs.term_t { .id = ecs .id (Position ) };
91- var it = ecs .each (world , & term );
90+ var it = ecs .each (world , Position );
9291 while (ecs .each_next (& it )) {
9392 if (ecs .field (& it , Position , 0 )) | positions | {
9493 for (positions , it .entities ()) | p , e | {
94+ try std .testing .expectEqual (p .x , 10 );
9595 print (
9696 "Term loop: {s}: ({d}, {d})\n " ,
9797 .{ ecs .get_name (world , e ).? , p .x , p .y },
0 commit comments