diff options
Diffstat (limited to 'src/blog/2023-11-14-test-visibility-c-macro/test4.c')
| -rw-r--r-- | src/blog/2023-11-14-test-visibility-c-macro/test4.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/blog/2023-11-14-test-visibility-c-macro/test4.c b/src/blog/2023-11-14-test-visibility-c-macro/test4.c new file mode 100644 index 0000000..9298e89 --- /dev/null +++ b/src/blog/2023-11-14-test-visibility-c-macro/test4.c | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | int foo(int, int); | ||
| 4 | |||
| 5 | int main() { | ||
| 6 | int result = foo(1, 1); | ||
| 7 | |||
| 8 | if (result == -27) { | ||
| 9 | fprintf(stderr, "Test passed\n"); | ||
| 10 | return 0; | ||
| 11 | } else { | ||
| 12 | fprintf(stderr, "Test failed: expected -27, got %d\n", result); | ||
| 13 | return 1; | ||
| 14 | } | ||
| 15 | } | ||
