4 files changed, 47 insertions(+), 0 deletions(-)

M fml/tests/main.rs
A => fml/tests/test_tuple4.gt
A => fml/tests/test_typedef1.gt
A => fml/tests/test_typedef2.gt
M fml/tests/main.rs +12 -0
@@ 46,6 46,12 @@ fn test_tuple3() {
 }
 
 #[test]
+fn test_tuple4() {
+    let src = include_str!("test_tuple4.gt");
+    let _output = fml::compile("test_tuple4.gt", src);
+}
+
+#[test]
 fn test_lambda1() {
     let src = include_str!("test_lambda1.gt");
     let _output = fml::compile("test_lambda1.gt", src);

          
@@ 81,3 87,9 @@ fn test_typedef1() {
     let src = include_str!("test_typedef1.gt");
     let _output = fml::compile("test_typedef1.gt", src);
 }
+
+#[test]
+fn test_typedef2() {
+    let src = include_str!("test_typedef2.gt");
+    let _output = fml::compile("test_typedef2.gt", src);
+}

          
A => fml/tests/test_tuple4.gt +9 -0
@@ 0,0 1,9 @@ 
+
+fn thing(i: {@T1, @T2}): {@T1, @T2} =
+    i
+end
+
+fn main(): I32 =
+    let a: {I32, Bool} = thing({1, false})
+    3
+end

          
A => fml/tests/test_typedef1.gt +13 -0
@@ 0,0 1,13 @@ 
+
+type Foo = I32
+
+fn thing(i: I32): Foo =
+    $Foo(i)
+end
+
+
+fn main(): I32 =
+    let f1: Foo = $Foo(3)
+    let f2: Foo = thing(4)
+    3
+end

          
A => fml/tests/test_typedef2.gt +13 -0
@@ 0,0 1,13 @@ 
+
+type Foo = {I32, Bool}
+
+fn thing(i: I32): Foo =
+    $Foo({i, false})
+end
+
+
+fn main(): I32 =
+    let f1: Foo = $Foo({3, true})
+    let f2: Foo = thing(4)
+    3
+end