| ... | ... | @@ -78,8 +78,10 @@ pub fn expectEqual(expected: var, actual: @typeOf(expected)) void { |
| 78 | 78 | |
| 79 | 79 | TypeId.Array => |array| expectEqualSlices(array.child, &expected, &actual), |
| 80 | 80 | |
| 81 | | TypeId.Struct => { |
| 82 | | @compileError("TODO implement testing.expectEqual for structs"); |
| 81 | TypeId.Struct => |structType| { |
| 82 | inline for (structType.fields) |field| { |
| 83 | expectEqual(@field(expected, field.name), @field(actual, field.name)); |
| 84 | } |
| 83 | 85 | }, |
| 84 | 86 | |
| 85 | 87 | TypeId.Union => |union_info| { |