From 3c41cf98766aa9c4789da0baf715dccc6071c2c6 Mon Sep 17 00:00:00 2001 From: Enrico Lumetti Date: Mon, 15 Aug 2022 01:59:11 +0200 Subject: [PATCH] Add simpler full test --- complete-tests/test0.bril | 44 +++++++++++++++++++++++++++++++++++++++ complete-tests/test0.rvar | 3 +++ 2 files changed, 47 insertions(+) create mode 100644 complete-tests/test0.bril create mode 100644 complete-tests/test0.rvar diff --git a/complete-tests/test0.bril b/complete-tests/test0.bril new file mode 100644 index 0000000..1994f94 --- /dev/null +++ b/complete-tests/test0.bril @@ -0,0 +1,44 @@ +{ + "functions": [ + { + "args": [], + "instrs": [ + { + "label": "start" + }, + { + "dest": "tmp.0", + "op": "const", + "type": "int", + "value": 1 + }, + { + "dest": "tmp.1", + "op": "const", + "type": "int", + "value": 2 + }, + { + "args": [ + "tmp.0", + "tmp.1" + ], + "dest": "tmp.2", + "funcs": [], + "labels": [], + "op": "add", + "type": "int" + }, + { + "args": [ + "tmp.2" + ], + "funcs": [], + "labels": [], + "op": "return" + } + ], + "name": "main" + } + ] +} diff --git a/complete-tests/test0.rvar b/complete-tests/test0.rvar new file mode 100644 index 0000000..95289ea --- /dev/null +++ b/complete-tests/test0.rvar @@ -0,0 +1,3 @@ +(Program '() + (Prim '+ + (list (Int 1) (Int 2))))