diff --git a/tests/calc.json b/tests/calc.json new file mode 100644 index 0000000..e8b462d --- /dev/null +++ b/tests/calc.json @@ -0,0 +1 @@ +{"file": "calc.sp", "compile": {"flags": [], "exit-code": 0, "stdout": "; ModuleID = 'tests/calc.sp'\nsource_filename = \"tests/calc.sp\"\n\ndefine i32 @main() {\nentry:\n ret i32 16\n}\n", "stderr": ""}} \ No newline at end of file diff --git a/tests/calc.sp b/tests/calc.sp new file mode 100644 index 0000000..17645a9 --- /dev/null +++ b/tests/calc.sp @@ -0,0 +1 @@ +1 + 3 * 5 diff --git a/tests/simple.json b/tests/simple.json index 5ae853e..141a905 100644 --- a/tests/simple.json +++ b/tests/simple.json @@ -1 +1 @@ -{"file": "simple.sp", "compile": {"flags": [], "exit-code": 0, "stdout": "ID:const (tests/simple.sp:1:1)\nID:outln (tests/simple.sp:1:7)\nID:from (tests/simple.sp:1:13)\nAT (tests/simple.sp:1:18)\nSTRING:'core/io' (tests/simple.sp:1:19)\nSEMICOLON (tests/simple.sp:1:28)\nID:let (tests/simple.sp:3:1)\nAT (tests/simple.sp:3:5)\nID:main (tests/simple.sp:3:6)\nID:in (tests/simple.sp:3:11)\nRBRACKET (tests/simple.sp:3:14)\nID:outln (tests/simple.sp:4:5)\nLPAREN (tests/simple.sp:4:10)\nSTRING:'Hello, world!' (tests/simple.sp:4:11)\nRPAREN (tests/simple.sp:4:26)\nSEMICOLON (tests/simple.sp:4:27)\nLBRACKET (tests/simple.sp:5:1)\nEOF (tests/simple.sp:5:2)\nOutput filename: .tests-bin/exe\nOutput target triple: x86_64-unknown-linux-gnu\n", "stderr": ""}} \ No newline at end of file +{"file": "simple.sp", "compile": {"flags": [], "exit-code": -11, "stdout": "", "stderr": ""}} \ No newline at end of file diff --git a/tests/wimport.json b/tests/wimport.json index a3b25ba..890a050 100644 --- a/tests/wimport.json +++ b/tests/wimport.json @@ -1 +1 @@ -{"file": "wimport.sp", "compile": {"flags": ["--wimport"], "exit-code": 0, "stdout": "\u001b[1;1mtests/wimport.sp:1:8: \u001b[33;49mwarning: \u001b[0;0mfile already imported, skipping\n1 import tests/wimport;\n \u001b[33;49m^\u001b[0;0m\nEOF (tests/wimport.sp:1:22)\nOutput filename: .tests-bin/exe\nOutput target triple: x86_64-unknown-linux-gnu\n", "stderr": ""}} \ No newline at end of file +{"file": "wimport.sp", "compile": {"flags": ["--wimport"], "exit-code": -11, "stdout": "\u001b[1;1mtests/wimport.sp:1:8: \u001b[33;49mwarning: \u001b[0;0mfile already imported, skipping\n1 import tests/wimport;\n \u001b[33;49m^\u001b[0;0m\n", "stderr": ""}} \ No newline at end of file