-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite remaining failing integration tests
- Loading branch information
Showing
3 changed files
with
27 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
.version 0 | ||
.chunk "label_with_goto_after" | ||
.constants | ||
0 1 | ||
1 "1..1" | ||
2 "ok 1 goto works with a label defined after its use" | ||
3 "n" | ||
0 "1..1" | ||
1 "ok 1 goto works with a label defined after its use" | ||
2 "n" | ||
.metadata | ||
.bytecode | ||
# test that the assembler generate code for a goto | ||
# I0 = 1 | ||
set_var I0, 0, 0 | ||
# S0 = "1..1" | ||
set_var S0, 0, 1 | ||
# S1 = "ok 1"... | ||
set_var S1, 0, 2 | ||
# S2 = "n" | ||
set_var S2, 0, 3 | ||
# S0 = "1..1" | ||
set_imm S0, 0, 0 | ||
deref S0, CONSTS, S0 | ||
|
||
print_s I0, S0, x | ||
goto no_n, x | ||
print_s I0, S2, x | ||
# S1 = "ok 1 ..." | ||
set_imm S1, 0, 1 | ||
deref S1, CONSTS, S1 | ||
|
||
# S2 = "n" | ||
set_imm S2, 0, 2 | ||
deref S2, CONSTS, S2 | ||
|
||
set_imm I0, 0, 1 | ||
|
||
print_s I0, S0, x | ||
goto no_n | ||
print_s I0, S2, x | ||
|
||
no_n: | ||
print_s I0, S1, x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
.version 0 | ||
.chunk "label_without_goto" | ||
.constants | ||
0 1 | ||
1 "1..1" | ||
2 "ok 1 labels are parsed ok" | ||
0 "1..1" | ||
1 "ok 1 labels are parsed ok" | ||
.metadata | ||
.bytecode | ||
# test that the assembler can parse labels | ||
label0: | ||
label333: | ||
label1: set_var S0, 0, 1 | ||
label2: set_var S1, 0, 2 | ||
set_var I0, 0, 0 | ||
label1: set_imm S0, 0, 0 | ||
deref S0, CONSTS, S0 | ||
label2: set_imm S1, 0, 1 | ||
deref S1, CONSTS, S1 | ||
set_imm I0, 0, 1 | ||
label_99: print_s I0, S0, 42 | ||
label: print_s I0, S1, 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters