ref: d97dcac9b2b1e2526d897c508bb37c82e32517cd
parent: bc29b76c63d276ec52f11d9418d57bc131840849
author: Ori Bernstein <[email protected]>
date: Mon Jul 16 09:02:08 EDT 2012
Add test for builtin constraints.
--- /dev/null
+++ b/test/cstr-builtin.myr
@@ -1,0 +1,11 @@
+const max = {a:@a::tcnum, b:@a::tcnum
+ if a > b
+ -> a
+ else
+ -> b
+ ;;
+}
+
+const main = {
+ -> max(12, 42)
+}
--- a/test/tests
+++ b/test/tests
@@ -40,6 +40,7 @@
B log-or E 1
B str E 102
B generic E 42
+B cstr-builtin E 42
B sizeof E 4
B gsizeof E 5
B mkunion E 0