Splited main.zig into lib and test.zig
This commit is contained in:
parent
63e9b6b63d
commit
bcd888d59e
@ -11,13 +11,13 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
// 1. Define the module so other projects can import it
|
||||
const mod = b.addModule("dimal", .{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.root_source_file = b.path("src/lib.zig"),
|
||||
});
|
||||
mod.addImport("gpu", zig_wgpu.module("zig-wgpu"));
|
||||
|
||||
const exe_tests = b.addTest(.{
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.root_source_file = b.path("src/test.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
|
||||
@ -5,11 +5,3 @@ pub const Dimensions = @import("Dimensions.zig");
|
||||
pub const Scales = @import("Scales.zig");
|
||||
pub const Base = @import("Base.zig");
|
||||
pub const UnitParser = @import("UnitParser.zig");
|
||||
|
||||
test {
|
||||
_ = @import("Tensor.zig");
|
||||
_ = @import("Dimensions.zig");
|
||||
_ = @import("Scales.zig");
|
||||
_ = @import("Base.zig");
|
||||
_ = @import("UnitParser.zig");
|
||||
}
|
||||
7
src/test.zig
Normal file
7
src/test.zig
Normal file
@ -0,0 +1,7 @@
|
||||
test {
|
||||
_ = @import("Tensor.zig");
|
||||
_ = @import("Dimensions.zig");
|
||||
_ = @import("Scales.zig");
|
||||
_ = @import("Base.zig");
|
||||
_ = @import("UnitParser.zig");
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user