Make pointer variables in ( init-lib | init-exe )/build.zig const. (#10057)

* Make `main_tests` variable constant
* Apply same change in init-exe.zig
This commit is contained in:
InKryption 2021-10-29 18:37:17 +01:00 committed by GitHub
parent bbe4a9fa99
commit ee038df7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ pub fn build(b: *std.build.Builder) void {
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
var exe_tests = b.addTest("src/main.zig");
const exe_tests = b.addTest("src/main.zig");
exe_tests.setBuildMode(mode);
const test_step = b.step("test", "Run unit tests");

View File

@ -9,7 +9,7 @@ pub fn build(b: *std.build.Builder) void {
lib.setBuildMode(mode);
lib.install();
var main_tests = b.addTest("src/main.zig");
const main_tests = b.addTest("src/main.zig");
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");