| ... | ... | @@ -691,8 +691,9 @@ pub fn expectStringEndsWith(actual: []const u8, expected_ends_with: []const u8) |
| 691 | 691 | /// Container types(like Array/Slice/Vector) deeply equal when their corresponding elements are deeply equal. |
| 692 | 692 | /// Pointer values are deeply equal if values they point to are deeply equal. |
| 693 | 693 | /// |
| 694 | | /// Note: Self-referential structs are not supported (e.g. things like std.SinglyLinkedList) |
| 695 | | pub fn expectEqualDeep(expected: anytype, actual: @TypeOf(expected)) !void { |
| 694 | /// Note: Self-referential structs are supported (e.g. things like std.SinglyLinkedList) |
| 695 | /// but may cause infinite recursion or stack overflow when a container has a pointer to itself. |
| 696 | pub fn expectEqualDeep(expected: anytype, actual: @TypeOf(expected)) error{TestExpectedEqual}!void { |
| 696 | 697 | switch (@typeInfo(@TypeOf(actual))) { |
| 697 | 698 | .NoReturn, |
| 698 | 699 | .Opaque, |