summaryrefslogtreecommitdiff
path: root/tests/test.c
blob: 1d5fd3f176998c461f9d8a50886efee6e2cbcf9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>

// A simple function definition
void hello() {
    printf("Hello, world!\n");
}

// A function with parameters
int add(int a, int b) {
    return a + b;
}

// A function returning a pointer
int* get_pointer(int* x) {
    return x;
}

// A function declaration (prototype)
void declared_only(int x);

// A pointer to a function declaration
char* (*function_ptr_return)(int);

// A complex declaration
static inline const char* complex_func(const int* const ptr, void (*callback)(int)) {
    return "complex";
}

int main() {
    hello();
    return 0;
}

// Case sensitivity tests
void FooBar() {}
void foobar() {}
void FOOBAR() {}