authorgravatar for ivanstepanovftw@gmail.comIvan Stepanov <ivanstepanovftw@gmail.com> 2025-07-28 07:10:23+00:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-07-28 08:10:23+01:00
logdea3ed7f59347e87a1b8fa237202873988084ae8
tree09444a51c86b7fff29938906ece75d21d18606b0
parentbb29846732ce94d4492e824bd5252279b5220593
signaturebadge-check Signed by PGP key B5690EEEBB952194

build: fix error in standalone test when using `--release`

Co-authored-by: Carl Åstholm <carl@astholm.se>

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

test/standalone/dependency_options/build.zig+8-1
......@@ -10,7 +10,14 @@ pub fn build(b: *std.Build) !void {
1010
1111 const none_specified_mod = none_specified.module("dummy");
1212 if (!none_specified_mod.resolved_target.?.query.eql(b.graph.host.query)) return error.TestFailed;
13 if (none_specified_mod.optimize.? != .Debug) return error.TestFailed;
13 const expected_optimize: std.builtin.OptimizeMode = switch (b.release_mode) {
14 .off => .Debug,
15 .any => unreachable,
16 .fast => .ReleaseFast,
17 .safe => .ReleaseSafe,
18 .small => .ReleaseSmall,
19 };
20 if (none_specified_mod.optimize.? != expected_optimize) return error.TestFailed;
1421
1522 // Passing null is the same as not specifying the option,
1623 // so this should resolve to the same cached dependency instance.