diff --git a/test/ikc3/access.out.expected b/test/ikc3/access.out.expected
index dff8b47..da063d4 100644
--- a/test/ikc3/access.out.expected
+++ b/test/ikc3/access.out.expected
@@ -25,6 +25,9 @@ map.a.b.c + map.a.b.c
"0 #{map.a.b.c} 2"
"0 1 2"
op = %KC3.Operator{}
-%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
+%KC3.Operator{sym: :+,
+ symbol_value: ?,
+ operator_precedence: 0,
+ operator_associativity: :left}
op.sym
:+
diff --git a/test/ikc3/array.out.expected b/test/ikc3/array.out.expected
index 7b2ba69..55a25c1 100644
--- a/test/ikc3/array.out.expected
+++ b/test/ikc3/array.out.expected
@@ -4,8 +4,10 @@ a[0]
a[1]
0
1
-(U8[]) {{0, 1}, {2, 3}}
-(U8[]) {{0, 1}, {2, 3}}
+(U8[]) {{0, 1},
+ {2, 3}}
+(U8[]) {{0, 1},
+ {2, 3}}
b[0][0]
b[0][1]
b[1][0]
@@ -14,7 +16,10 @@ b[1][1]
1
2
3
-(U8[]) {{{0, 1}, {2, 3}}, {{4, 5}, {6, 7}}}
+(U8[]) {{{0, 1},
+ {2, 3}},
+ {{4, 5},
+ {6, 7}}}
c[0][0][0]
c[0][0][1]
c[0][1][0]
@@ -31,7 +36,14 @@ c[1][1][1]
5
6
7
-(U8[]) {{{{0, 1}, {2, 3}}, {{4, 5}, {6, 7}}}, {{{8, 9}, {10, 11}}, {{12, 13}, {14, 15}}}}
+(U8[]) {{{{0, 1},
+ {2, 3}},
+ {{4, 5},
+ {6, 7}}},
+ {{{8, 9},
+ {10, 11}},
+ {{12, 13},
+ {14, 15}}}}
d[0][0][0][0]
d[0][0][0][1]
d[0][0][1][0]
diff --git a/test/ikc3/block.out.expected b/test/ikc3/block.out.expected
index e059ec2..6e68758 100644
--- a/test/ikc3/block.out.expected
+++ b/test/ikc3/block.out.expected
@@ -43,3 +43,15 @@ do
def cast = cfn S32 "s32_init_cast" (Result, Sym, Tag)
end
cast
+do
+ do
+ 1
+ end
+end
+do
+ do
+ do
+ 1
+ end
+ end
+end
diff --git a/test/ikc3/buf.out.expected b/test/ikc3/buf.out.expected
index d0096ae..4e39b92 100644
--- a/test/ikc3/buf.out.expected
+++ b/test/ikc3/buf.out.expected
@@ -1,2 +1,14 @@
%Buf{}
-%Buf{column: (Sw) 0, flush: (Ptr) 0x0, free: false, line: (Sw) 0, ptr: (Ptr) 0x0, read_only: false, refill: (Ptr) 0x0, rpos: (Uw) 0, save: (Ptr) 0x0, seek: (Ptr) 0x0, size: (Uw) 0, user_ptr: (Ptr) 0x0, wpos: (Uw) 0}
+%Buf{column: (Sw) 0,
+ flush: (Ptr) 0x0,
+ free: false,
+ line: (Sw) 0,
+ ptr: (Ptr) 0x0,
+ read_only: false,
+ refill: (Ptr) 0x0,
+ rpos: (Uw) 0,
+ save: (Ptr) 0x0,
+ seek: (Ptr) 0x0,
+ size: (Uw) 0,
+ user_ptr: (Ptr) 0x0,
+ wpos: (Uw) 0}
diff --git a/test/ikc3/buf_rw.out.expected b/test/ikc3/buf_rw.out.expected
index 8f5e311..f42fa2f 100644
--- a/test/ikc3/buf_rw.out.expected
+++ b/test/ikc3/buf_rw.out.expected
@@ -1,2 +1,3 @@
%BufRW{}
-%BufRW{r: (Ptr) 0x0, w: (Ptr) 0x0}
+%BufRW{r: (Ptr) 0x0,
+ w: (Ptr) 0x0}
diff --git a/test/ikc3/defoperator.out.expected b/test/ikc3/defoperator.out.expected
index 5a32f3e..03bbca4 100644
--- a/test/ikc3/defoperator.out.expected
+++ b/test/ikc3/defoperator.out.expected
@@ -1,6 +1,12 @@
%KC3.Operator{}
-%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
-def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+%KC3.Operator{sym: :+,
+ symbol_value: ?,
+ operator_precedence: 0,
+ operator_associativity: :left}
+def operator_muul = %KC3.Operator{sym: :****,
+ symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result),
+ operator_precedence: 11,
+ operator_associativity: :left}
operator_muul
4 **** 4
16
diff --git a/test/ikc3/defstruct.out.expected b/test/ikc3/defstruct.out.expected
index 16219c3..0b51bb4 100644
--- a/test/ikc3/defstruct.out.expected
+++ b/test/ikc3/defstruct.out.expected
@@ -3,4 +3,5 @@ defmodule Test do
end
Test
%Test{}
-%Test{a: 1, b: 2}
+%Test{a: 1,
+ b: 2}
diff --git a/test/ikc3/fn.kc3 b/test/ikc3/fn.kc3
index 6d54c2d..dd4c9af 100644
--- a/test/ikc3/fn.kc3
+++ b/test/ikc3/fn.kc3
@@ -27,3 +27,17 @@ e = fn (x) do
x * 2
end
e(2)
+quote do
+ f = fn (x) do
+ puts("Hello, world !")
+ x * 2
+ end
+ f(2)
+end
+do
+ f = fn (x) do
+ puts("Hello, world !")
+ x * 2
+ end
+ f(2)
+end
diff --git a/test/ikc3/fn.out.expected b/test/ikc3/fn.out.expected
index b35f792..7a6dd80 100644
--- a/test/ikc3/fn.out.expected
+++ b/test/ikc3/fn.out.expected
@@ -27,3 +27,12 @@ fn (x) do
x * 2
end
4
+do
+ f = fn (x) do
+ puts("Hello, world !")
+ x * 2
+ end
+ f(2)
+end
+Hello, world !
+4
\ No newline at end of file
diff --git a/test/ikc3/function_call.err.expected b/test/ikc3/function_call.err.expected
deleted file mode 100644
index e69de29..0000000
--- a/test/ikc3/function_call.err.expected
+++ /dev/null
diff --git a/test/ikc3/function_call.out.expected b/test/ikc3/function_call.out.expected
deleted file mode 100644
index 004a0c4..0000000
--- a/test/ikc3/function_call.out.expected
+++ /dev/null
@@ -1,10 +0,0 @@
-fn {...}
-
-8
-16
-8
-16
-16000
-32000
-16000
-32000
diff --git a/test/ikc3/function_call.ret.expected b/test/ikc3/function_call.ret.expected
deleted file mode 100644
index 573541a..0000000
--- a/test/ikc3/function_call.ret.expected
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/ikc3/gl.out.expected b/test/ikc3/gl.out.expected
index 8a6093f..2f9884b 100644
--- a/test/ikc3/gl.out.expected
+++ b/test/ikc3/gl.out.expected
@@ -1,8 +1,20 @@
%GL.Vec2{}
-%GL.Vec2{x: 0.0f, y: 0.0f}
+%GL.Vec2{x: 0.0f,
+ y: 0.0f}
%GL.Vec3{}
-%GL.Vec3{x: 0.0f, y: 0.0f, z: 0.0f}
+%GL.Vec3{x: 0.0f,
+ y: 0.0f,
+ z: 0.0f}
%GL.Vertex{}
-%GL.Vertex{position: %GL.Vec3{x: 0.0f, y: 0.0f, z: 0.0f}, normal: %GL.Vec3{x: 0.0f, y: 0.0f, z: 0.0f}, tex_coord: %GL.Vec2{x: 0.0f, y: 0.0f}}
+%GL.Vertex{position: %GL.Vec3{x: 0.0f,
+ y: 0.0f,
+ z: 0.0f},
+ normal: %GL.Vec3{x: 0.0f,
+ y: 0.0f,
+ z: 0.0f},
+ tex_coord: %GL.Vec2{x: 0.0f,
+ y: 0.0f}}
%GL.Triangle{}
-%GL.Triangle{a: (U32) 0, b: (U32) 1, c: (U32) 2}
+%GL.Triangle{a: (U32) 0,
+ b: (U32) 1,
+ c: (U32) 2}
diff --git a/test/ikc3/if.kc3 b/test/ikc3/if.kc3
index ccbb8d4..0579d19 100644
--- a/test/ikc3/if.kc3
+++ b/test/ikc3/if.kc3
@@ -58,3 +58,29 @@ else
3 + 3
4 + 4
end
+quote if false do
+ if false do
+ 1
+ else
+ 2
+ end
+else
+ if false do
+ 3
+ else
+ 4
+ end
+end
+if false do
+ if false do
+ 1
+ else
+ 2
+ end
+else
+ if false do
+ 3
+ else
+ 4
+ end
+end
diff --git a/test/ikc3/if.out.expected b/test/ikc3/if.out.expected
index 49a8850..f26a753 100644
--- a/test/ikc3/if.out.expected
+++ b/test/ikc3/if.out.expected
@@ -34,3 +34,17 @@ else
4 + 4
end
8
+if false do
+ if false do
+ 1
+ else
+ 2
+ end
+else
+ if false do
+ 3
+ else
+ 4
+ end
+end
+4
diff --git a/test/ikc3/let.out.expected b/test/ikc3/let.out.expected
index fe1a2bb..29fc0ba 100644
--- a/test/ikc3/let.out.expected
+++ b/test/ikc3/let.out.expected
@@ -2,7 +2,8 @@ let %{a: 1} do
a
end
1
-let %{a: 1, b: 2} do
+let %{a: 1,
+ b: 2} do
a + b
end
3
diff --git a/test/ikc3/map.out.expected b/test/ikc3/map.out.expected
index 4deb429..e0ca446 100644
--- a/test/ikc3/map.out.expected
+++ b/test/ikc3/map.out.expected
@@ -2,81 +2,167 @@
%{}
%{a: 1}
%{a: 1}
-%{a: 1, b: 2}
-%{a: 1, b: 2}
-%{a: 1, b: 2, c: 3}
-%{a: 1, b: 2, c: 3}
-%{a: 3, b: 2, c: 1}
-%{a: 3, b: 2, c: 1}
+%{a: 1,
+ b: 2}
+%{a: 1,
+ b: 2}
+%{a: 1,
+ b: 2,
+ c: 3}
+%{a: 1,
+ b: 2,
+ c: 3}
+%{a: 3,
+ b: 2,
+ c: 1}
+%{a: 3,
+ b: 2,
+ c: 1}
%{"a" => 1}
%{"a" => 1}
-%{"a" => 1, "b" => 2}
-%{"a" => 1, "b" => 2}
-%{"a" => 1, "b" => 2, "c" => 3}
-%{"a" => 1, "b" => 2, "c" => 3}
-%{"a" => 3, "b" => 2, "c" => 1}
-%{"a" => 3, "b" => 2, "c" => 1}
+%{"a" => 1,
+ "b" => 2}
+%{"a" => 1,
+ "b" => 2}
+%{"a" => 1,
+ "b" => 2,
+ "c" => 3}
+%{"a" => 1,
+ "b" => 2,
+ "c" => 3}
+%{"a" => 3,
+ "b" => 2,
+ "c" => 1}
+%{"a" => 3,
+ "b" => 2,
+ "c" => 1}
%{1 => 1}
%{1 => 1}
-%{1 => 1, 2 => 2}
-%{1 => 1, 2 => 2}
-%{1 => 1, 2 => 2, 3 => 3}
-%{1 => 1, 2 => 2, 3 => 3}
-%{1 => 3, 2 => 2, 3 => 1}
-%{1 => 3, 2 => 2, 3 => 1}
+%{1 => 1,
+ 2 => 2}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+%{b: b} = %{a: 1,
+ b: 2}
+%{a: 1,
+ b: 2}
b
2
-%{a: A, b: A} < %{a: A, b: A}
+%{a: A,
+ b: A} < %{a: A,
+ b: A}
false
-%{a: A, b: A} < %{a: A, c: A}
+%{a: A,
+ b: A} < %{a: A,
+ c: A}
true
-%{a: A, c: A} < %{a: A, b: A}
+%{a: A,
+ c: A} < %{a: A,
+ b: A}
false
-%{a: A, b: A} < %{a: A, b: B}
+%{a: A,
+ b: A} < %{a: A,
+ b: B}
true
-%{a: B, b: A} < %{a: A, b: A}
+%{a: B,
+ b: A} < %{a: A,
+ b: A}
false
-%{a: A, b: A} == %{a: A, b: A}
+%{a: A,
+ b: A} == %{a: A,
+ b: A}
true
-%{a: A, b: A} == %{a: A, c: A}
+%{a: A,
+ b: A} == %{a: A,
+ c: A}
false
-%{a: A, c: A} == %{a: A, b: A}
+%{a: A,
+ c: A} == %{a: A,
+ b: A}
false
-%{a: A, b: A} == %{a: A, b: B}
+%{a: A,
+ b: A} == %{a: A,
+ b: B}
false
-%{a: B, b: A} == %{a: A, b: A}
+%{a: B,
+ b: A} == %{a: A,
+ b: A}
false
-%{a: A, b: A} > %{a: A, b: A}
+%{a: A,
+ b: A} > %{a: A,
+ b: A}
false
-%{a: A, b: A} > %{a: A, c: A}
+%{a: A,
+ b: A} > %{a: A,
+ c: A}
false
-%{a: A, c: A} > %{a: A, b: A}
+%{a: A,
+ c: A} > %{a: A,
+ b: A}
true
-%{a: A, b: A} > %{a: A, b: B}
+%{a: A,
+ b: A} > %{a: A,
+ b: B}
false
-%{a: B, b: A} > %{a: A, b: A}
+%{a: B,
+ b: A} > %{a: A,
+ b: A}
true