wwtest: native package-test coordinator
Single-directory package-test planner: discovers *.ww, groups white-box and external <pkg>_test sources, composes the combined test package, builds it through the sibling ww driver, and runs it with the runtime's -package/-list/-timeout-ms contract. test/package holds its E2E corpus and the manual runtime fixture set.
This commit is contained in:
5
test/package/routing/a_helper_test.ww
Normal file
5
test/package/routing/a_helper_test.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
package routing;
|
||||
|
||||
// Canonical test-only helper: no @test declaration in this file. Both
|
||||
// same-package test files below share it through the single white-box build.
|
||||
fn privatevalue() int = { return value() + 1; };
|
||||
5
test/package/routing/b_white_test.ww
Normal file
5
test/package/routing/b_white_test.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
package routing;
|
||||
|
||||
@test fn private_helper_first() void = {
|
||||
assert(privatevalue() == 8);
|
||||
};
|
||||
7
test/package/routing/external_test.ww
Normal file
7
test/package/routing/external_test.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
package routing_test;
|
||||
|
||||
import routing;
|
||||
|
||||
@test fn external_package() void = {
|
||||
assert(routing.value() == 7);
|
||||
};
|
||||
3
test/package/routing/routing.ww
Normal file
3
test/package/routing/routing.ww
Normal file
@@ -0,0 +1,3 @@
|
||||
package routing;
|
||||
|
||||
export fn value() int = { return 7; };
|
||||
6
test/package/routing/routing_test.ww
Normal file
6
test/package/routing/routing_test.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
package routing;
|
||||
|
||||
@test fn same_package() void = {
|
||||
assert(value() == 7);
|
||||
assert(privatevalue() == 8);
|
||||
};
|
||||
Reference in New Issue
Block a user