| ... | ... | @@ -158,7 +158,6 @@ pub fn addGenHTests(b: *build.Builder, test_filter: ?[]const u8) *build.Step { |
| 158 | 158 | .step = b.step("test-gen-h", "Run the C header file generation tests"), |
| 159 | 159 | .test_index = 0, |
| 160 | 160 | .test_filter = test_filter, |
| 161 | | .counter = 0, |
| 162 | 161 | }; |
| 163 | 162 | |
| 164 | 163 | gen_h.addCases(cases); |
| ... | ... | @@ -1105,7 +1104,6 @@ pub const GenHContext = struct { |
| 1105 | 1104 | step: *build.Step, |
| 1106 | 1105 | test_index: usize, |
| 1107 | 1106 | test_filter: ?[]const u8, |
| 1108 | | counter: usize, |
| 1109 | 1107 | |
| 1110 | 1108 | const TestCase = struct { |
| 1111 | 1109 | name: []const u8, |
| ... | ... | @@ -1208,11 +1206,7 @@ pub const GenHContext = struct { |
| 1208 | 1206 | } |
| 1209 | 1207 | |
| 1210 | 1208 | pub fn add(self: *GenHContext, name: []const u8, source: []const u8, expected_lines: ...) void { |
| 1211 | | // MacOS appears to not be returning nanoseconds in fstat mtime, |
| 1212 | | // which causes fast test executions to think the file contents are unchanged. |
| 1213 | | const modified_name = self.b.fmt("test-{}.zig", self.counter); |
| 1214 | | self.counter += 1; |
| 1215 | | const tc = self.create(modified_name, name, source, expected_lines); |
| 1209 | const tc = self.create("test.zig", name, source, expected_lines); |
| 1216 | 1210 | self.addCase(tc); |
| 1217 | 1211 | } |
| 1218 | 1212 | |