mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
28 lines
715 B
Zig
28 lines
715 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const test_step = b.step("test", "Test it");
|
|
b.default_step = test_step;
|
|
|
|
const optimize: std.builtin.OptimizeMode = .Debug;
|
|
|
|
const exe = b.addExecutable(.{
|
|
.name = "test",
|
|
.root_module = b.createModule(.{
|
|
.target = b.graph.host,
|
|
.optimize = optimize,
|
|
}),
|
|
});
|
|
exe.addCSourceFile(.{
|
|
.file = b.path("test.c"),
|
|
.flags = &.{"-std=c23"},
|
|
});
|
|
exe.linkLibC();
|
|
exe.addEmbedPath(b.path("data"));
|
|
|
|
const run_c_cmd = b.addRunArtifact(exe);
|
|
run_c_cmd.expectExitCode(0);
|
|
run_c_cmd.skip_foreign_checks = true;
|
|
test_step.dependOn(&run_c_cmd.step);
|
|
}
|