diff options
| author | Carl Åstholm <carl@astholm.se> | 2024-01-01 17:37:32 +0100 |
|---|---|---|
| committer | Carl Åstholm <carl@astholm.se> | 2024-01-03 21:20:49 +0100 |
| commit | 85869f8225dc3f2d21fe540559e05fd1fa94d5ed (patch) | |
| tree | a5361265787cff9414bd7aea5e5d75d0b9060b47 /lib/std/multi_array_list.zig | |
| parent | d7b36503cad1de60cd0b6a115ef7ac336a03a09a (diff) | |
| download | zig-85869f8225dc3f2d21fe540559e05fd1fa94d5ed.tar.gz zig-85869f8225dc3f2d21fe540559e05fd1fa94d5ed.zip | |
Correct expected/actual parameter order of some assertions
Diffstat (limited to 'lib/std/multi_array_list.zig')
| -rw-r--r-- | lib/std/multi_array_list.zig | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/std/multi_array_list.zig b/lib/std/multi_array_list.zig index 7187e25f0f..6ac3ad73e2 100644 --- a/lib/std/multi_array_list.zig +++ b/lib/std/multi_array_list.zig @@ -842,24 +842,24 @@ test "union" { &.{ .a, .b, .b, .a, .a, .a, .a, .a, .a }, list.items(.tags), ); - try testing.expectEqual(list.get(0), Foo{ .a = 1 }); - try testing.expectEqual(list.get(1), Foo{ .b = "zigzag" }); - try testing.expectEqual(list.get(2), Foo{ .b = "foobar" }); - try testing.expectEqual(list.get(3), Foo{ .a = 4 }); - try testing.expectEqual(list.get(4), Foo{ .a = 5 }); - try testing.expectEqual(list.get(5), Foo{ .a = 6 }); - try testing.expectEqual(list.get(6), Foo{ .a = 7 }); - try testing.expectEqual(list.get(7), Foo{ .a = 8 }); - try testing.expectEqual(list.get(8), Foo{ .a = 9 }); + try testing.expectEqual(Foo{ .a = 1 }, list.get(0)); + try testing.expectEqual(Foo{ .b = "zigzag" }, list.get(1)); + try testing.expectEqual(Foo{ .b = "foobar" }, list.get(2)); + try testing.expectEqual(Foo{ .a = 4 }, list.get(3)); + try testing.expectEqual(Foo{ .a = 5 }, list.get(4)); + try testing.expectEqual(Foo{ .a = 6 }, list.get(5)); + try testing.expectEqual(Foo{ .a = 7 }, list.get(6)); + try testing.expectEqual(Foo{ .a = 8 }, list.get(7)); + try testing.expectEqual(Foo{ .a = 9 }, list.get(8)); list.shrinkAndFree(ally, 3); try testing.expectEqual(@as(usize, 3), list.items(.tags).len); try testing.expectEqualSlices(meta.Tag(Foo), list.items(.tags), &.{ .a, .b, .b }); - try testing.expectEqual(list.get(0), Foo{ .a = 1 }); - try testing.expectEqual(list.get(1), Foo{ .b = "zigzag" }); - try testing.expectEqual(list.get(2), Foo{ .b = "foobar" }); + try testing.expectEqual(Foo{ .a = 1 }, list.get(0)); + try testing.expectEqual(Foo{ .b = "zigzag" }, list.get(1)); + try testing.expectEqual(Foo{ .b = "foobar" }, list.get(2)); } test "sorting a span" { |
