Use macro per-test-file
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
605798674f
commit
06816567ff
49 changed files with 213 additions and 271 deletions
|
|
@ -1,187 +0,0 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
info:
|
||||
input: "{{= 5 * 3 }}\n{{= 2 * 3 + 4 * 3 }}\n{{= 3 / 3 + 3 }}"
|
||||
context: {}
|
||||
input_file: tests/cases/maths.nomo
|
||||
---
|
||||
VMInstructions {
|
||||
labels: {},
|
||||
instructions: [
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(5))]"5" (4..5),
|
||||
value: Integer {
|
||||
value: 5,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 1,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (8..9),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 2,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Times,
|
||||
left_slot: VariableSlot {
|
||||
index: 1,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 2,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 0,
|
||||
},
|
||||
},
|
||||
EmitFromSlot {
|
||||
slot: VariableSlot {
|
||||
index: 0,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n" (12..13),
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(2))]"2" (17..18),
|
||||
value: Integer {
|
||||
value: 2,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 5,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (21..22),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 6,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Times,
|
||||
left_slot: VariableSlot {
|
||||
index: 5,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 6,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 4,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(4))]"4" (25..26),
|
||||
value: Integer {
|
||||
value: 4,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 8,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (29..30),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 9,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Times,
|
||||
left_slot: VariableSlot {
|
||||
index: 8,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 9,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 7,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Plus,
|
||||
left_slot: VariableSlot {
|
||||
index: 4,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 7,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 3,
|
||||
},
|
||||
},
|
||||
EmitFromSlot {
|
||||
slot: VariableSlot {
|
||||
index: 3,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n" (33..34),
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (38..39),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 12,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (42..43),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 13,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Divide,
|
||||
left_slot: VariableSlot {
|
||||
index: 12,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 13,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 11,
|
||||
},
|
||||
},
|
||||
LoadLiteralToSlot {
|
||||
source: [Literal(Integer(3))]"3" (46..47),
|
||||
value: Integer {
|
||||
value: 3,
|
||||
},
|
||||
slot: VariableSlot {
|
||||
index: 14,
|
||||
},
|
||||
},
|
||||
MathOperate {
|
||||
op: Plus,
|
||||
left_slot: VariableSlot {
|
||||
index: 11,
|
||||
},
|
||||
right_slot: VariableSlot {
|
||||
index: 14,
|
||||
},
|
||||
result_slot: VariableSlot {
|
||||
index: 10,
|
||||
},
|
||||
},
|
||||
EmitFromSlot {
|
||||
slot: VariableSlot {
|
||||
index: 10,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue