From a3fe5cb793759d2b9526ac8b7ad96e30a08813d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 9 Oct 2026 08:07:39 +0200 Subject: [PATCH] test-standalone: remove zerolength_check We don't need this anymore since our baseline CPU model for wasm is lime1. --- test/standalone/build.zig.zon | 3 --- test/standalone/zerolength_check/build.zig | 27 ------------------- test/standalone/zerolength_check/src/main.zig | 24 ----------------- 3 files changed, 54 deletions(-) delete mode 100644 test/standalone/zerolength_check/build.zig delete mode 100644 test/standalone/zerolength_check/src/main.zig diff --git a/test/standalone/build.zig.zon b/test/standalone/build.zig.zon index 70fa17180500779d389ac25eb5c491ac4939cb99..d5489dbf828e89040ca2233fd3bfdf57a7e91366 100644 --- a/test/standalone/build.zig.zon +++ b/test/standalone/build.zig.zon @@ -138,9 +138,6 @@ .strip_struct_init = .{ .path = "strip_struct_init", }, - .zerolength_check = .{ - .path = "zerolength_check", - }, .coff_dwarf = .{ .path = "coff_dwarf", }, diff --git a/test/standalone/zerolength_check/build.zig b/test/standalone/zerolength_check/build.zig deleted file mode 100644 index 19102ef6d68bb0cd948b1b0598e5578776c48dc5..0000000000000000000000000000000000000000 --- a/test/standalone/zerolength_check/build.zig +++ /dev/null @@ -1,27 +0,0 @@ -const std = @import("std"); - -pub fn build(b: *std.Build) void { - const test_step = b.step("test", "Test it"); - b.default_step = test_step; - - add(b, test_step, .debug); - add(b, test_step, .fast); - add(b, test_step, .small); - add(b, test_step, .safe); -} - -fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize) void { - const unit_tests = b.addTest(.{ .root_module = b.createModule(.{ - .root_source_file = b.path("src/main.zig"), - .target = b.resolveTargetQuery(.{ - .os_tag = .wasi, - .cpu_arch = .wasm32, - .cpu_features_add = std.Target.wasm.featureSet(&.{.bulk_memory}), - }), - .optimize = optimize, - }) }); - - const run_unit_tests = b.addRunArtifact(unit_tests); - run_unit_tests.skip_foreign_checks = true; - test_step.dependOn(&run_unit_tests.step); -} diff --git a/test/standalone/zerolength_check/src/main.zig b/test/standalone/zerolength_check/src/main.zig deleted file mode 100644 index 2f674ab4ff0aa086c4a85bdde01796e086ff7653..0000000000000000000000000000000000000000 --- a/test/standalone/zerolength_check/src/main.zig +++ /dev/null @@ -1,24 +0,0 @@ -const std = @import("std"); - -test { - const dest = foo(); - const source = foo(); - - @memcpy(dest, source); - @memmove(dest, source); - @memset(dest, 4); - @memset(dest, undefined); - - const dest2 = foo2(); - @memset(dest2, 0); -} - -fn foo() []u8 { - const ptr = comptime std.mem.alignBackward(usize, std.math.maxInt(usize), 1); - return @as([*]align(1) u8, @ptrFromInt(ptr))[0..0]; -} - -fn foo2() []u64 { - const ptr = comptime std.mem.alignBackward(usize, std.math.maxInt(usize), 1); - return @as([*]align(1) u64, @ptrFromInt(ptr))[0..0]; -} -- 2.54.0