diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-14 18:49:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-14 18:49:34 +0100 |
| commit | ce25bbd863904ac7784b647b6b8e22196e7674ff (patch) | |
| tree | e4e11995999db844bee50692e63d5c117af3e2f9 /src/blog/2023-11-14-test-visibility-c-macro/test4.c | |
| parent | 5ed505e280c6c6a7459bb2e4249313fa65df052f (diff) | |
| download | sebastiano.tronto.net-ce25bbd863904ac7784b647b6b8e22196e7674ff.tar.gz sebastiano.tronto.net-ce25bbd863904ac7784b647b6b8e22196e7674ff.zip | |
Added blog post
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 | } | ||
