aboutsummaryrefslogtreecommitdiff
path: root/test/optionals.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-31 02:11:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-31 02:11:03 -0400
commit7a172be6213839a3d023ba21c3bafd7540a4bfe8 (patch)
tree5646ba0e4c0690fe64711fb77658308541de695b /test/optionals.tm
parentd3655740cc6a8e6c4788946af412065fb52f51dc (diff)
Remove threads and mutexed data from the language in favor of a
module-based approach
Diffstat (limited to 'test/optionals.tm')
-rw-r--r--test/optionals.tm39
1 files changed, 0 insertions, 39 deletions
diff --git a/test/optionals.tm b/test/optionals.tm
index 58f1b98c..02817441 100644
--- a/test/optionals.tm
+++ b/test/optionals.tm
@@ -61,18 +61,6 @@ func maybe_c_string(should_i:Bool->CString?):
else:
return none
-func maybe_thread(should_i:Bool->Thread?):
- if should_i:
- return Thread.new(func(): pass)
- else:
- return none
-
-func maybe_mutexed(should_i:Bool->mutexed(Bool)?):
- if should_i:
- return mutexed no
- else:
- return none
-
func main():
>> 5?
= 5?
@@ -244,33 +232,6 @@ func main():
fail("Truthy: $nope")
else: !! Falsey: $nope
- do:
- !! ...
- !! Threads:
- >> yep := maybe_thread(yes)
- # No "=" test here because threads use addresses in the text version
- >> nope := maybe_thread(no)
- = none : Thread
- >> if yep: >> yep
- else: fail("Falsey: $yep")
- >> if nope:
- fail("Truthy: $nope")
- else: !! Falsey: $nope
-
- do:
- !! ...
- !! Mutexed:
- >> yep := maybe_mutexed(yes)
- # No "=" test here because threads use addresses in the text version
- >> nope := maybe_mutexed(no)
- = none : mutexed(Bool)
- >> if yep: >> yep
- else: fail("Falsey: $yep")
- >> if nope:
- fail("Truthy: $nope")
- else: !! Falsey: $nope
-
-
if yep := maybe_int(yes):
>> yep
= 123