Skip to content

Commit

Permalink
TEST: Add for SubroutineCall and FunctionCall
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Dec 17, 2023
1 parent 55743eb commit e3c5164
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ endmacro(RUN)
# wasm --- compile to WASM binary directly

RUN(NAME expr1.c LABELS gcc c wasm llvm NOFAST)
RUN(NAME expr2.c LABELS gcc c wasm llvm NOFAST)

# arrays
RUN(NAME array_01.cpp LABELS gcc llvm NOFAST)
Expand Down
17 changes: 17 additions & 0 deletions integration_tests/expr2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <stdio.h>

void subrout(int x) {
printf("%s %d\n", "x is", x);
}

int func(int x) {
return x + 2;
}

int main() {
int p = 26;
subrout(p);
p = func(p);
printf("%s %d\n", "p is", p);
return 0;
}

0 comments on commit e3c5164

Please sign in to comment.