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
88
tests/cases/if_else_if.3-instructions.snap
Normal file
88
tests/cases/if_else_if.3-instructions.snap
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
info:
|
||||
input: "{{ if test }}\n Not Hello World! :C\n{{ else if another_test }}\n Hello World!\n{{ end }}"
|
||||
context:
|
||||
test: false
|
||||
stuff: more
|
||||
another_test: true
|
||||
---
|
||||
VMInstructions {
|
||||
labels: {
|
||||
LabelSlot {
|
||||
index: 0,
|
||||
}: 14,
|
||||
LabelSlot {
|
||||
index: 2,
|
||||
}: 7,
|
||||
LabelSlot {
|
||||
index: 4,
|
||||
}: 14,
|
||||
},
|
||||
instructions: [
|
||||
LoadFromContextToSlot {
|
||||
name: "test" (6..10),
|
||||
slot: VariableSlot {
|
||||
index: 1,
|
||||
},
|
||||
},
|
||||
JumpIfNotTrue {
|
||||
emit_slot: VariableSlot {
|
||||
index: 1,
|
||||
},
|
||||
jump: LabelSlot {
|
||||
index: 2,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (13..18),
|
||||
},
|
||||
AppendContent {
|
||||
content: "Not Hello World! :C" (18..37),
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n" (37..38),
|
||||
},
|
||||
Jump {
|
||||
jump: LabelSlot {
|
||||
index: 0,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (13..18),
|
||||
},
|
||||
LoadFromContextToSlot {
|
||||
name: "another_test" (49..61),
|
||||
slot: VariableSlot {
|
||||
index: 3,
|
||||
},
|
||||
},
|
||||
JumpIfNotTrue {
|
||||
emit_slot: VariableSlot {
|
||||
index: 3,
|
||||
},
|
||||
jump: LabelSlot {
|
||||
index: 4,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (64..69),
|
||||
},
|
||||
AppendContent {
|
||||
content: "Hello World!" (69..81),
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n" (81..82),
|
||||
},
|
||||
Jump {
|
||||
jump: LabelSlot {
|
||||
index: 0,
|
||||
},
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (64..69),
|
||||
},
|
||||
NoOp,
|
||||
],
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue