File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -822,11 +822,11 @@ test "EnumMap iterator for one field" {
822822
823823 var a = std .EnumMap (Enum0 , u32 ).initFull (123 );
824824 var it0 = a .iterator ();
825- try testing .expectEqual (it0 .next ().? .key , Enum0 .x );
825+ try testing .expect (it0 .next ().? .key == Enum0 .x );
826826
827827 var b = std .EnumMap (Enum1 , u32 ).initFull (123 );
828828 var it1 = b .iterator ();
829- try testing .expectEqual (it1 .next ().? .key , Enum1 .x );
829+ try testing .expect (it1 .next ().? .key == Enum1 .x );
830830}
831831
832832/// A multiset of enum elements up to a count of usize. Backed
@@ -1335,11 +1335,11 @@ test "EnumArray iterator for one field" {
13351335
13361336 var a = std .EnumArray (Enum0 , u32 ).initFill (123 );
13371337 var it0 = a .iterator ();
1338- try testing .expectEqual (it0 .next ().? .key , Enum0 .x );
1338+ try testing .expect (it0 .next ().? .key == Enum0 .x );
13391339
13401340 var b = std .EnumArray (Enum1 , u32 ).initFill (123 );
13411341 var it1 = b .iterator ();
1342- try testing .expectEqual (it1 .next ().? .key , Enum1 .x );
1342+ try testing .expect (it1 .next ().? .key == Enum1 .x );
13431343}
13441344
13451345pub fn EnumIndexer (comptime E : type ) type {
Original file line number Diff line number Diff line change @@ -391,8 +391,8 @@ test "Type.Enum" {
391391 } });
392392 const s0 : struct { E } = .{.foo };
393393 const s1 : struct { k : E } = .{ .k = .foo };
394- try testing .expectEqual (.foo , s0 [0 ]);
395- try testing .expectEqual (.foo , s1 .k );
394+ try testing .expect (.foo == s0 [0 ]);
395+ try testing .expect (.foo == s1 .k );
396396 }
397397
398398 { // meta.FieldEnum() with single field
You can’t perform that action at this time.
0 commit comments