authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:29:57-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:35:39-04:00
log6a5c2b249d64952f3fc91b554e484d27ceb3d1a9
tree97cdde8b7c858210cde8394c8427c880f4064958
parent895fab156a83e7a71487388dfa22743aa54c4b7e
signature Commit is signed but in an unrecognized format.

Revert "use unique test source names for test-gen-h"

This reverts commit 264b03d57027da4b7c6e691d9b2a4340cd10fff0. This workaround is no longer necessary.

1 files changed, 1 insertions(+), 7 deletions(-)

test/tests.zig+1-7
...@@ -158,7 +158,6 @@ pub fn addGenHTests(b: *build.Builder, test_filter: ?[]const u8) *build.Step {...@@ -158,7 +158,6 @@ pub fn addGenHTests(b: *build.Builder, test_filter: ?[]const u8) *build.Step {
158 .step = b.step("test-gen-h", "Run the C header file generation tests"),158 .step = b.step("test-gen-h", "Run the C header file generation tests"),
159 .test_index = 0,159 .test_index = 0,
160 .test_filter = test_filter,160 .test_filter = test_filter,
161 .counter = 0,
162 };161 };
163162
164 gen_h.addCases(cases);163 gen_h.addCases(cases);
...@@ -1105,7 +1104,6 @@ pub const GenHContext = struct {...@@ -1105,7 +1104,6 @@ pub const GenHContext = struct {
1105 step: *build.Step,1104 step: *build.Step,
1106 test_index: usize,1105 test_index: usize,
1107 test_filter: ?[]const u8,1106 test_filter: ?[]const u8,
1108 counter: usize,
11091107
1110 const TestCase = struct {1108 const TestCase = struct {
1111 name: []const u8,1109 name: []const u8,
...@@ -1208,11 +1206,7 @@ pub const GenHContext = struct {...@@ -1208,11 +1206,7 @@ pub const GenHContext = struct {
1208 }1206 }
12091207
1210 pub fn add(self: *GenHContext, name: []const u8, source: []const u8, expected_lines: ...) void {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,1209 const tc = self.create("test.zig", name, source, expected_lines);
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);
1216 self.addCase(tc);1210 self.addCase(tc);
1217 }1211 }
12181212