ref: 4c4a81a00c9265c4279f9442564c37f30df3fd63
parent: 506eba89a05c1c8f2c9120beec55acfc9d756f4f
author: Ori Bernstein <[email protected]>
date: Mon Sep 23 09:31:59 EDT 2013
Add tests for using stdlib option types.
--- /dev/null
+++ b/test/stdoption-none.myr
@@ -1,0 +1,13 @@
+use std
+
+const f = {
+ -> `std.None
+}
+
+const main = {
+ match f()
+ `std.Some x: -> x;;
+ `std.None: -> 42;;
+ ;;
+}
+
--- /dev/null
+++ b/test/stdoption-some.myr
@@ -1,0 +1,9 @@
+use std
+
+const main = {
+ match `std.Some 42
+ `std.Some x: -> x;;
+ `std.None: -> 1;;
+ ;;
+}
+
--- a/test/tests
+++ b/test/tests
@@ -64,6 +64,8 @@
B genericret E 42
B genericmatch E 15
B genericrec E 0
+B stdoption-some E 42
+B stdoption-none E 42
B sizeof E 4
B gsizeof E 5
B mkunion E 0