aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/import.tm20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/import.tm b/test/import.tm
index e6a9b4ae..9c878002 100644
--- a/test/import.tm
+++ b/test/import.tm
@@ -1,12 +1,20 @@
-imported := use ./use_import.tm
+vectors := use ../examples/vectors.tm
+use ./use_import.tm
-func asdf()->imported.ImportedType:
- return imported.get_value()
+func returns_vec()->vectors.Vec2:
+ return vectors.Vec2(1, 2)
+
+func returns_imported_type()->ImportedType:
+ return get_value() # Imported from ./use_import.tm
func main():
- >> [:imported.ImportedType]
- >> asdf()
+ >> [:vectors.Vec2]
+ >> returns_vec()
+ = Vec2(x=1, y=2)
+
+ >> [:ImportedType]
+ >> returns_imported_type()
= ImportedType(name="Hello")
- >> imported.needs_initializing
+ >> needs_initializing # imported from ./use_import.tm
= 999999999999999999