Commit d9cd4d0876

Alex Rønne Petersen <alex@alexrp.com>
2025-10-04 20:49:56
test: remove standalone options test
This functionality is already load-bearing for the compiler's own build script so this (disabled, possibly bitrotted?) doesn't really add value.
1 parent f6c1864
Changed files (3)
test
standalone
test/standalone/options/src/main.zig
@@ -1,12 +0,0 @@
-const std = @import("std");
-const assert = std.debug.assert;
-
-const build_options = @import("build_options");
-
-test "build options" {
-    comptime assert(build_options.bool_true);
-    comptime assert(!build_options.bool_false);
-    comptime assert(build_options.int == 1234);
-    comptime assert(build_options.e == .two);
-    comptime assert(std.mem.eql(u8, build_options.string, "hello"));
-}
test/standalone/options/build.zig
@@ -1,21 +0,0 @@
-const std = @import("std");
-
-pub fn build(b: *std.Build) void {
-    const main = b.addTest(.{ .root_module = b.createModule(.{
-        .root_source_file = b.path("src/main.zig"),
-        .target = b.graph.host,
-        .optimize = .Debug,
-    }) });
-
-    const options = b.addOptions();
-    main.root_module.addOptions("build_options", options);
-    options.addOption(bool, "bool_true", b.option(bool, "bool_true", "t").?);
-    options.addOption(bool, "bool_false", b.option(bool, "bool_false", "f").?);
-    options.addOption(u32, "int", b.option(u32, "int", "i").?);
-    const E = enum { one, two, three };
-    options.addOption(E, "e", b.option(E, "e", "e").?);
-    options.addOption([]const u8, "string", b.option([]const u8, "string", "s").?);
-
-    const test_step = b.step("test", "Run unit tests");
-    test_step.dependOn(&b.addRunArtifact(main).step);
-}
test/standalone/build.zig.zon
@@ -143,10 +143,6 @@
         //.sigpipe = .{
         //    .path = "sigpipe",
         //},
-        // TODO restore this test
-        //.options = .{
-        //    .path = "options",
-        //},
         .strip_empty_loop = .{
             .path = "strip_empty_loop",
         },