module: test empty/minimal module

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-03-16 22:23:51 -07:00 committed by Stephen Gutekanst
parent 388a1fbfca
commit cd2f3fbc3f

View file

@ -791,6 +791,9 @@ test "dispatch" {
var foo = struct { var foo = struct {
injected_args_sum: usize = 0, injected_args_sum: usize = 0,
}{}; }{};
const Minimal = Module(struct {
pub const name = .engine_minimal;
});
const Physics = Module(struct { const Physics = Module(struct {
pub const name = .engine_physics; pub const name = .engine_physics;
pub const components = struct {}; pub const components = struct {};
@ -836,6 +839,7 @@ test "dispatch" {
const injectable = .{&foo}; const injectable = .{&foo};
var modules: Modules(.{ var modules: Modules(.{
Minimal,
Physics, Physics,
Renderer, Renderer,
}, @TypeOf(injectable)) = undefined; }, @TypeOf(injectable)) = undefined;