Skip to content

Commit

Permalink
test: Testcases should all return 0
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvank committed Dec 7, 2024
1 parent b70280a commit 91e38d1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/inp_arg_macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ int main()
int cde = ADD(a, 20);
char *s = STR(cde);
printf("%s: %d\n", s, cde);
return 0;
}
4 changes: 4 additions & 0 deletions tests/output/inp_arg_macro.c_asm_output.asm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ mov rax, rbp
sub rax, 8
mov [rbp-112], rax
call printf
mov rax, 0
mov rsp, rbp
pop rbp
ret
mov rsp, rbp
pop rbp
ret
Expand Down
3 changes: 3 additions & 0 deletions tests/output/inp_arg_macro.c_lex_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@ TKN_COMMA
TKN_ID(cde)
TKN_R_PAREN
TKN_SEMICOLON
TKN_RETURN
TKN_LIT_INT(0)
TKN_SEMICOLON
TKN_R_BRACE
TKN_EOF
3 changes: 3 additions & 0 deletions tests/output/inp_arg_macro.c_prep_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ TKN_COMMA
TKN_ID(cde)
TKN_R_PAREN
TKN_SEMICOLON
TKN_RETURN
TKN_LIT_INT(0)
TKN_SEMICOLON
TKN_R_BRACE
TKN_EOF
3 changes: 3 additions & 0 deletions tests/output/inp_arg_macro.c_run_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./out ""
-------------
cde: 100
2 changes: 2 additions & 0 deletions tests/output/inp_arg_macro.c_tree_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ Program(
)
Variable(s)
Variable(cde)
Return:
Literal(Type: 34, Value: 0)
)
)

0 comments on commit 91e38d1

Please sign in to comment.