Skip to content

Commit

Permalink
test: Update test data
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvank committed Dec 3, 2024
1 parent 6064364 commit c1797de
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
8 changes: 3 additions & 5 deletions tests/output/inp_break.c_asm_output.asm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mov [rbp-48], rax
call printf
jmp __tmp_label_1
__tmp_label_4:
jmp __tmp_label_1
jmp __tmp_label_0
jmp __tmp_label_0
__tmp_label_1:
; exit loop
Expand Down Expand Up @@ -94,7 +94,6 @@ mov rax, rbp
sub rax, 8
mov [rbp-80], rax
call printf
jmp __tmp_label_6
__tmp_label_11:
mov rax, rbp
sub rax, 16
Expand Down Expand Up @@ -143,9 +142,9 @@ mov rax, rbp
sub rax, 16
mov [rbp-24], rax
mov rax, [rbp-16]
mov rbx, 0
mov rbx, 10
cmp rax, rbx
jge __tmp_label_17
jle __tmp_label_17
mov rax, 0
jmp __tmp_label_18
__tmp_label_17:
Expand Down Expand Up @@ -234,7 +233,6 @@ mov [rbx], rax
jmp __tmp_label_19
__tmp_label_20:
; exit loop
jmp __tmp_label_16
mov rax, rbp
sub rax, 16
mov [rbp-48], rax
Expand Down
12 changes: 4 additions & 8 deletions tests/output/inp_break.c_lex_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ TKN_LIT_STR(i is 0
)
TKN_R_PAREN
TKN_SEMICOLON
TKN_CONTINUE
TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_BREAK
TKN_CONTINUE
TKN_SEMICOLON
TKN_R_BRACE
TKN_FOR
Expand Down Expand Up @@ -72,8 +72,6 @@ TKN_LIT_STR(i is 0
)
TKN_R_PAREN
TKN_SEMICOLON
TKN_CONTINUE
TKN_SEMICOLON
TKN_R_BRACE
TKN_IF
TKN_L_PAREN
Expand All @@ -94,8 +92,8 @@ TKN_ASSIGN
TKN_LIT_INT(0)
TKN_SEMICOLON
TKN_ID(i)
TKN_GTE
TKN_LIT_INT(0)
TKN_LTE
TKN_LIT_INT(10)
TKN_SEMICOLON
TKN_ID(i)
TKN_ASSIGN
Expand Down Expand Up @@ -146,8 +144,6 @@ TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_R_BRACE
TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_RETURN
TKN_LIT_INT(0)
Expand Down
12 changes: 4 additions & 8 deletions tests/output/inp_break.c_prep_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ TKN_LIT_STR(i is 0
)
TKN_R_PAREN
TKN_SEMICOLON
TKN_CONTINUE
TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_BREAK
TKN_CONTINUE
TKN_SEMICOLON
TKN_R_BRACE
TKN_FOR
Expand Down Expand Up @@ -72,8 +72,6 @@ TKN_LIT_STR(i is 0
)
TKN_R_PAREN
TKN_SEMICOLON
TKN_CONTINUE
TKN_SEMICOLON
TKN_R_BRACE
TKN_IF
TKN_L_PAREN
Expand All @@ -94,8 +92,8 @@ TKN_ASSIGN
TKN_LIT_INT(0)
TKN_SEMICOLON
TKN_ID(i)
TKN_GTE
TKN_LIT_INT(0)
TKN_LTE
TKN_LIT_INT(10)
TKN_SEMICOLON
TKN_ID(i)
TKN_ASSIGN
Expand Down Expand Up @@ -146,8 +144,6 @@ TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_R_BRACE
TKN_BREAK
TKN_SEMICOLON
TKN_R_BRACE
TKN_RETURN
TKN_LIT_INT(0)
Expand Down
8 changes: 3 additions & 5 deletions tests/output/inp_break.c_tree_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Program(
Literal(Type: 33, Value: i is 0
)
Break
Break
Continue
For(
Init:
VarDecl(i):
Expand Down Expand Up @@ -85,7 +85,6 @@ Program(
Args:
Literal(Type: 33, Value: i is 0
)
Break
If(
Cond:
BinaryOp(Op: 65)
Expand All @@ -104,11 +103,11 @@ Program(
Value:
Literal(Type: 34, Value: 0)
Cond:
BinaryOp(Op: 69)
BinaryOp(Op: 68)
Left:
Variable(i)
Right:
Literal(Type: 34, Value: 0)
Literal(Type: 34, Value: 10)
Act:
BinaryOp(Op: 64)
Left:
Expand Down Expand Up @@ -164,7 +163,6 @@ Program(
Body:
CompoundStatement
Break
Break
Return:
Literal(Type: 34, Value: 0)
)
Expand Down

0 comments on commit c1797de

Please sign in to comment.