Skip to content

Commit

Permalink
[Cider 2] Initial test suite setup (#2110)
Browse files Browse the repository at this point in the history
* Add register dumping

* remove the dummy primitive

* Configure the test suite and add a bunch of tests

* clippy
  • Loading branch information
EclecticGriffin authored Jun 6, 2024
1 parent 7d9413a commit c9fdd23
Show file tree
Hide file tree
Showing 26 changed files with 480 additions and 16 deletions.
5 changes: 5 additions & 0 deletions interp/cider2-tests/control/if.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"mem": [
4
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/control/if_reg.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"reg0": [
0
],
"reg1": [
10
]
}
17 changes: 17 additions & 0 deletions interp/cider2-tests/control/iter_mult.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"a": [
8
],
"c": [
0
],
"i": [
4
],
"m": [
11
],
"q": [
15
]
}
11 changes: 11 additions & 0 deletions interp/cider2-tests/control/par_mem.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"a": [
1
],
"b": [
1
],
"c": [
1
]
}
11 changes: 11 additions & 0 deletions interp/cider2-tests/control/par_reg.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"a": [
1
],
"b": [
1
],
"c": [
1
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/control/reg_seq.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"reg0": [
9
],
"reg1": [
400
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/control/while.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"i": [
8
],
"lt_reg": [
0
]
}
11 changes: 11 additions & 0 deletions interp/cider2-tests/par-to-seq/par_mem.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"a": [
1
],
"b": [
1
],
"c": [
1
]
}
11 changes: 11 additions & 0 deletions interp/cider2-tests/par-to-seq/par_reg.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"a": [
1
],
"b": [
1
],
"c": [
1
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/primitives/add-overflow.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"reg0": [
7
],
"reg1": [
7
]
}
35 changes: 35 additions & 0 deletions interp/cider2-tests/primitives/binary.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"add_reg": [
409
],
"and_reg": [
8
],
"eq_reg": [
1
],
"ge_reg": [
1
],
"gt_reg": [
0
],
"le_reg": [
1
],
"lt_reg": [
0
],
"neq_reg": [
0
],
"or_reg": [
15
],
"sub_reg": [
391
],
"xor_reg": [
7
]
}
20 changes: 20 additions & 0 deletions interp/cider2-tests/primitives/flickering_go.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mult0": [
0
],
"mult1": [
32
],
"mult_reg0": [
0
],
"mult_reg1": [
32
],
"reg0": [
0
],
"reg1": [
12
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/primitives/mem.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mem": [
9
],
"reg0": [
9
]
}
25 changes: 25 additions & 0 deletions interp/cider2-tests/primitives/mem2.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"mem0": [
0,
0,
0,
2,
1,
0,
0,
0
],
"mem1": [
0,
0,
0,
0,
1,
0,
0,
0
],
"reg0": [
1
]
}
8 changes: 8 additions & 0 deletions interp/cider2-tests/primitives/reg.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"reg0": [
157
],
"reg1": [
157
]
}
14 changes: 14 additions & 0 deletions interp/cider2-tests/primitives/slice.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"reg0": [
0
],
"reg1": [
1
],
"reg14": [
14
],
"reg15": [
15
]
}
5 changes: 5 additions & 0 deletions interp/cider2-tests/primitives/sqrt.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"result": [
20
]
}
Loading

0 comments on commit c9fdd23

Please sign in to comment.