Skip to content

Commit

Permalink
Add example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JayFoxRox committed Jan 6, 2019
1 parent b9f5119 commit ce511a5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python-scripts/dsp_instruction_tests/code-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"input": {
"a2": "0x00",
"a1": "0x000000",
"a0": "0x000000"
},
"code": [
"move #$12, a2",
"move #$345678, a1",
"move #$9ABCDE, a0"
],
"output": [
"a2","a1","a0"
]
}
15 changes: 15 additions & 0 deletions python-scripts/dsp_instruction_tests/inc_a-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"input": {
"a2": "0x00",
"a1": "0x000000",
"a0": "0x000000"
},
"code": [
":0x000008", "; inc a"
],
"output": [
"a2",
"a1",
"a0"
]
}
13 changes: 13 additions & 0 deletions python-scripts/dsp_instruction_tests/memory-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"input": {
"x:$10": ["0xFF0012","0x123456"],
"x:$20": ["0x789ABC"]
},
"code": [
"move x:$10, x0",
"move x0, x:$20"
],
"output": [
"x0"
]
}
16 changes: 16 additions & 0 deletions python-scripts/dsp_instruction_tests/registers-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"input": {
"a2": "0x00", "a1": "0x000000", "a0": "0x000000"
},
"code": [],
"output": [
"vba", "sr", "omr", "sp", "ssh", "ssl", "la", "lc",
"a2","a1","a0",
"b2","b1","b0",
"x0", "x1",
"y0", "y1",
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"m0", "m1", "m2", "m3", "m4", "m5", "m6", "m7",
"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n7"
]
}

0 comments on commit ce511a5

Please sign in to comment.