aboutsummaryrefslogtreecommitdiff
path: root/test/reductions.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-25 15:40:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-25 15:40:59 -0400
commit1f9147187d66e95a0ffedd4d5595ec98646b5fe1 (patch)
tree14281e5cbde8e15fae63953b72844fb1a11d6f73 /test/reductions.tm
parentd88d8648dc7802fbeac2f28dc5f2ef8fdfe1a9e4 (diff)
Make docstring tests use an actual expression AST instead of text
matching
Diffstat (limited to 'test/reductions.tm')
-rw-r--r--test/reductions.tm10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/reductions.tm b/test/reductions.tm
index 7ab95779..840a3b3c 100644
--- a/test/reductions.tm
+++ b/test/reductions.tm
@@ -2,10 +2,10 @@ struct Foo(x,y:Int)
func main():
>> (+: [10, 20, 30])
- = 60 : Int?
+ = 60?
>> (+: [:Int])
- = none : Int?
+ = none : Int
>> (+: [10, 20, 30]) or 0
= 60
@@ -14,10 +14,10 @@ func main():
= 0
>> (_max_: [3, 5, 2, 1, 4])
- = 5 : Int?
+ = 5?
>> (_max_:abs(): [1, -10, 5])
- = -10 : Int?
+ = -10?
>> (_max_: [Foo(0, 0), Foo(1, 0), Foo(0, 10)])!
= Foo(x=1, y=0)
@@ -37,7 +37,7 @@ func main():
= yes
>> (<=: [:Int])
- = none : Bool?
+ = none : Bool
>> (<=: [5, 4, 3, 2, 1])!
= no