aboutsummaryrefslogtreecommitdiff
path: root/test/when.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 16:07:23 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 16:07:23 -0400
commit6782cc5570e194791ca6cdd695b88897e9145564 (patch)
treea428e9d954aca251212ec1cf15bd35e0badce630 /test/when.tm
parent448e805293989b06e07878a4a87fdd378f7c6e02 (diff)
No more colons for blocks
Diffstat (limited to 'test/when.tm')
-rw-r--r--test/when.tm14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/when.tm b/test/when.tm
index d93745dd..28573d88 100644
--- a/test/when.tm
+++ b/test/when.tm
@@ -1,13 +1,13 @@
# Tests for the 'when' block
-func main():
+func main()
answers := [
(
- when x is "A","B":
+ when x is "A","B"
"A or B"
- is "C":
+ is "C"
"C"
- else:
+ else
"Other"
) for x in ["A", "B", "C", "D"]
]
@@ -15,7 +15,7 @@ func main():
= ["A or B", "A or B", "C", "Other"]
n := 23
- >> when n is 1: Int64(1)
- is 2: Int64(2)
- is 21 + 2: Int64(23)
+ >> when n is 1 Int64(1)
+ is 2 Int64(2)
+ is 21 + 2 Int64(23)
= Int64(23)?