diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-07-16 12:15:46 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-07-16 12:15:46 -0400 |
| commit | 9dcddc2249217c8c99c9d07bb0187904847d2ae2 (patch) | |
| tree | 1edf9eddb4d9353a5778c86c69366de963ea7eeb /test/tests.zig | |
| parent | 92e781baa147a7d07af4cb3c1f08c08bed8613e4 (diff) | |
| download | zig-9dcddc2249217c8c99c9d07bb0187904847d2ae2.tar.gz zig-9dcddc2249217c8c99c9d07bb0187904847d2ae2.zip | |
retire the example/ folder, rename test-build-examples to "standalone"
closes #2759
Diffstat (limited to 'test/tests.zig')
| -rw-r--r-- | test/tests.zig | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/tests.zig b/test/tests.zig index 411f16d92b..d94c012ac1 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -13,7 +13,7 @@ const Mode = builtin.Mode; const LibExeObjStep = build.LibExeObjStep; const compare_output = @import("compare_output.zig"); -const build_examples = @import("build_examples.zig"); +const standalone = @import("standalone.zig"); const compile_errors = @import("compile_errors.zig"); const assemble_and_link = @import("assemble_and_link.zig"); const runtime_safety = @import("runtime_safety.zig"); @@ -91,17 +91,17 @@ pub fn addCompileErrorTests(b: *build.Builder, test_filter: ?[]const u8, modes: return cases.step; } -pub fn addBuildExampleTests(b: *build.Builder, test_filter: ?[]const u8, modes: []const Mode) *build.Step { - const cases = b.allocator.create(BuildExamplesContext) catch unreachable; - cases.* = BuildExamplesContext{ +pub fn addStandaloneTests(b: *build.Builder, test_filter: ?[]const u8, modes: []const Mode) *build.Step { + const cases = b.allocator.create(StandaloneContext) catch unreachable; + cases.* = StandaloneContext{ .b = b, - .step = b.step("test-build-examples", "Build the examples"), + .step = b.step("test-standalone", "Run the standalone tests"), .test_index = 0, .test_filter = test_filter, .modes = modes, }; - build_examples.addCases(cases); + standalone.addCases(cases); return cases.step; } @@ -830,22 +830,22 @@ pub const CompileErrorContext = struct { } }; -pub const BuildExamplesContext = struct { +pub const StandaloneContext = struct { b: *build.Builder, step: *build.Step, test_index: usize, test_filter: ?[]const u8, modes: []const Mode, - pub fn addC(self: *BuildExamplesContext, root_src: []const u8) void { + pub fn addC(self: *StandaloneContext, root_src: []const u8) void { self.addAllArgs(root_src, true); } - pub fn add(self: *BuildExamplesContext, root_src: []const u8) void { + pub fn add(self: *StandaloneContext, root_src: []const u8) void { self.addAllArgs(root_src, false); } - pub fn addBuildFile(self: *BuildExamplesContext, build_file: []const u8) void { + pub fn addBuildFile(self: *StandaloneContext, build_file: []const u8) void { const b = self.b; const annotated_case_name = b.fmt("build {} (Debug)", build_file); @@ -875,7 +875,7 @@ pub const BuildExamplesContext = struct { self.step.dependOn(&log_step.step); } - pub fn addAllArgs(self: *BuildExamplesContext, root_src: []const u8, link_libc: bool) void { + pub fn addAllArgs(self: *StandaloneContext, root_src: []const u8, link_libc: bool) void { const b = self.b; for (self.modes) |mode| { |
