From 47e8972427c152891c4c6c4b458f78cd7ceb8aee Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 5 Sep 2024 15:49:18 -0400 Subject: Update 'use' test to include a '../examples/vectors.tm' import as well as an unnamed import --- test/import.tm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'test/import.tm') 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 -- cgit v1.2.3