mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Compare commits
2 Commits
48b0eef3e9
...
3f2cf1c002
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f2cf1c002 | ||
|
|
c9a788c851 |
@ -97,6 +97,7 @@ pub fn build(b: *std.Build) !void {
|
||||
const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;
|
||||
const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;
|
||||
const skip_llvm = b.option(bool, "skip-llvm", "Main test suite skips targets that use LLVM backend") orelse false;
|
||||
const skip_test_incremental = b.option(bool, "skip-test-incremental", "Main test step omits dependency on test-incremental step") orelse false;
|
||||
|
||||
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
|
||||
|
||||
@ -609,7 +610,7 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
const test_incremental_step = b.step("test-incremental", "Run the incremental compilation test cases");
|
||||
try tests.addIncrementalTests(b, test_incremental_step);
|
||||
test_step.dependOn(test_incremental_step);
|
||||
if (!skip_test_incremental) test_step.dependOn(test_incremental_step);
|
||||
|
||||
if (tests.addLibcTests(b, .{
|
||||
.optimize_modes = optimization_modes,
|
||||
|
||||
@ -59,6 +59,7 @@ Write-Output "Main test suite..."
|
||||
-Dstatic-llvm `
|
||||
-Dskip-non-native `
|
||||
-Dskip-release `
|
||||
-Dskip-test-incremental `
|
||||
-Denable-symlinks-windows `
|
||||
--test-timeout 30m
|
||||
CheckLastExitCode
|
||||
|
||||
@ -58,6 +58,7 @@ Write-Output "Main test suite..."
|
||||
--search-prefix "$PREFIX_PATH" `
|
||||
-Dstatic-llvm `
|
||||
-Dskip-non-native `
|
||||
-Dskip-test-incremental `
|
||||
-Denable-symlinks-windows `
|
||||
--test-timeout 30m
|
||||
CheckLastExitCode
|
||||
|
||||
63
test/incremental/add_decl
Normal file
63
test/incremental/add_decl
Normal file
@ -0,0 +1,63 @@
|
||||
#target=x86_64-linux-selfhosted
|
||||
#target=x86_64-windows-selfhosted
|
||||
#target=x86_64-linux-cbe
|
||||
#target=x86_64-windows-cbe
|
||||
//#target=wasm32-wasi-selfhosted
|
||||
#update=initial version
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(foo);
|
||||
}
|
||||
const foo = "good morning\n";
|
||||
#expect_stdout="good morning\n"
|
||||
|
||||
#update=add new declaration
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(foo);
|
||||
}
|
||||
const foo = "good morning\n";
|
||||
const bar = "good evening\n";
|
||||
#expect_stdout="good morning\n"
|
||||
|
||||
#update=reference new declaration
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(bar);
|
||||
}
|
||||
const foo = "good morning\n";
|
||||
const bar = "good evening\n";
|
||||
#expect_stdout="good evening\n"
|
||||
|
||||
#update=reference missing declaration
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(qux);
|
||||
}
|
||||
const foo = "good morning\n";
|
||||
const bar = "good evening\n";
|
||||
#expect_error=main.zig:3:39: error: use of undeclared identifier 'qux'
|
||||
|
||||
#update=add missing declaration
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(qux);
|
||||
}
|
||||
const foo = "good morning\n";
|
||||
const bar = "good evening\n";
|
||||
const qux = "good night\n";
|
||||
#expect_stdout="good night\n"
|
||||
|
||||
#update=remove unused declarations
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.fs.File.stdout().writeAll(qux);
|
||||
}
|
||||
const qux = "good night\n";
|
||||
#expect_stdout="good night\n"
|
||||
Loading…
x
Reference in New Issue
Block a user