summaryrefslogtreecommitdiff
path: root/tests/modules/test_namespaced.zc
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-14 23:59:54 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-14 23:59:54 +0000
commitdcfdc053cb5f9fb4d5eac0a2233c75126b7a8188 (patch)
treef34f30b382fa22d6fd0af46875a5b4b26d00feff /tests/modules/test_namespaced.zc
parenta918df69269a39ef7350a645b5db025d66ecb18a (diff)
Added some of the tests.
Diffstat (limited to 'tests/modules/test_namespaced.zc')
-rw-r--r--tests/modules/test_namespaced.zc16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/modules/test_namespaced.zc b/tests/modules/test_namespaced.zc
new file mode 100644
index 0000000..d2aa8cd
--- /dev/null
+++ b/tests/modules/test_namespaced.zc
@@ -0,0 +1,16 @@
+
+import "./test_modules/math.zc" as math;
+import "./test_modules/physics.zc" as physics;
+
+test "test_namespaced_imports" {
+ var mv = math::Vector::new(3, 4);
+ var pv = physics::Vector::new(5.0, 12.0);
+
+ var len1 = math::Vector::length(&mv);
+ var len2 = physics::Vector::magnitude(&pv);
+
+ assert(len1 == 5, "Math vector length failed");
+ assert(len2 == 13.0, "Physics vector magnitude failed");
+
+ "PASS: Namespaced imports work correctly";
+}