aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-08 02:08:47 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-08 02:09:52 -0500
commit5a194a3e0dc01d7ba0d9ad81030284ebda13cbd6 (patch)
tree61c7419612cafe56f25f37b1718c57f716980048 /test
parent86228917b98a3ef4019e9e18fcafacc948ffcfd1 (diff)
Add checks for unused variables
Diffstat (limited to 'test')
-rw-r--r--test/import.tm2
-rw-r--r--test/paths.tm2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/import.tm b/test/import.tm
index cb642ac6..e05d7e4f 100644
--- a/test/import.tm
+++ b/test/import.tm
@@ -9,9 +9,11 @@ func returns_imported_type(->ImportedType)
func main()
>> empty : [vectors.Vec2]
+ assert empty == []
assert returns_vec() == Vec2(x=1, y=2)
>> imported : [ImportedType]
+ assert imported == []
assert returns_imported_type() == ImportedType("Hello")
assert needs_initializing == 999999999999999999
diff --git a/test/paths.tm b/test/paths.tm
index a0ae4384..6622847e 100644
--- a/test/paths.tm
+++ b/test/paths.tm
@@ -30,7 +30,7 @@ func main()
assert (./does-not-exist.xxx).read() == none
assert (./does-not-exist.xxx).read_bytes() == none
- if lines := (./does-not-exist.xxx).by_line() then
+ if (./does-not-exist.xxx).by_line()
fail("I could read lines in a nonexistent file")
else
pass