zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 6a5c2b249d64952f3fc91b554e484d27ceb3d1a9 (tree)
parent 895fab156a83e7a71487388dfa22743aa54c4b7e
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 11 Mar 2019 10:29:57 -0400

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

This reverts commit 264b03d57027da4b7c6e691d9b2a4340cd10fff0.

This workaround is no longer necessary.

Diffstat:
Mtest/tests.zig | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/test/tests.zig b/test/tests.zig @@ -158,7 +158,6 @@ pub fn addGenHTests(b: *build.Builder, test_filter: ?[]const u8) *build.Step { .step = b.step("test-gen-h", "Run the C header file generation tests"), .test_index = 0, .test_filter = test_filter, - .counter = 0, }; gen_h.addCases(cases); @@ -1105,7 +1104,6 @@ pub const GenHContext = struct { step: *build.Step, test_index: usize, test_filter: ?[]const u8, - counter: usize, const TestCase = struct { name: []const u8, @@ -1208,11 +1206,7 @@ pub const GenHContext = struct { } pub fn add(self: *GenHContext, name: []const u8, source: []const u8, expected_lines: ...) void { - // MacOS appears to not be returning nanoseconds in fstat mtime, - // which causes fast test executions to think the file contents are unchanged. - const modified_name = self.b.fmt("test-{}.zig", self.counter); - self.counter += 1; - const tc = self.create(modified_name, name, source, expected_lines); + const tc = self.create("test.zig", name, source, expected_lines); self.addCase(tc); }