diff options
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r-- | Tests/TryCompile/Inner/innerexe.c | 5 | ||||
-rw-r--r-- | Tests/TryCompile/Inner/innerlib.c | 5 | ||||
-rw-r--r-- | Tests/TryCompile/expect_arg.c | 16 | ||||
-rw-r--r-- | Tests/TryCompile/fail2a.c | 5 | ||||
-rw-r--r-- | Tests/TryCompile/pass.c | 2 | ||||
-rw-r--r-- | Tests/TryCompile/pass2a.c | 5 | ||||
-rw-r--r-- | Tests/TryCompile/pass2b.cxx | 5 | ||||
-rw-r--r-- | Tests/TryCompile/testdef.c | 7 |
8 files changed, 31 insertions, 19 deletions
diff --git a/Tests/TryCompile/Inner/innerexe.c b/Tests/TryCompile/Inner/innerexe.c index 9b121a1..e329c5f 100644 --- a/Tests/TryCompile/Inner/innerexe.c +++ b/Tests/TryCompile/Inner/innerexe.c @@ -1,2 +1,5 @@ extern int innerlib(void); -int main() { return innerlib(); } +int main() +{ + return innerlib(); +} diff --git a/Tests/TryCompile/Inner/innerlib.c b/Tests/TryCompile/Inner/innerlib.c index 0ce1179..69653ad 100644 --- a/Tests/TryCompile/Inner/innerlib.c +++ b/Tests/TryCompile/Inner/innerlib.c @@ -1 +1,4 @@ -int innerlib(void) { return 0; } +int innerlib(void) +{ + return 0; +} diff --git a/Tests/TryCompile/expect_arg.c b/Tests/TryCompile/expect_arg.c index f18e03f..267b587 100644 --- a/Tests/TryCompile/expect_arg.c +++ b/Tests/TryCompile/expect_arg.c @@ -1,22 +1,18 @@ #include <stdio.h> #include <string.h> -int main(int ac, char*av[]) +int main(int ac, char* av[]) { int i; printf("ac = [%d]\n", ac); - for(i =0; i < ac; i++) - { + for (i = 0; i < ac; i++) { printf("arg[%d] = %s\n", i, av[i]); - } - if(ac == 3) - { - if(strcmp(av[1], "arg1") ==0 - && strcmp(av[2], "arg2") ==0) - { + } + if (ac == 3) { + if (strcmp(av[1], "arg1") == 0 && strcmp(av[2], "arg2") == 0) { printf("arg1 and arg2 present and accounted for!\n"); return 0; - } } + } printf("arg1 and arg2 missing!\n"); return -1; } diff --git a/Tests/TryCompile/fail2a.c b/Tests/TryCompile/fail2a.c index 78f2de1..8488f4e 100644 --- a/Tests/TryCompile/fail2a.c +++ b/Tests/TryCompile/fail2a.c @@ -1 +1,4 @@ -int main(void) { return 0; } +int main(void) +{ + return 0; +} diff --git a/Tests/TryCompile/pass.c b/Tests/TryCompile/pass.c index 43e8a7e..f8b643a 100644 --- a/Tests/TryCompile/pass.c +++ b/Tests/TryCompile/pass.c @@ -2,5 +2,3 @@ int main() { return 0; } - - diff --git a/Tests/TryCompile/pass2a.c b/Tests/TryCompile/pass2a.c index bbfe6d5..27c377b 100644 --- a/Tests/TryCompile/pass2a.c +++ b/Tests/TryCompile/pass2a.c @@ -1,2 +1,5 @@ extern int pass2b(void); -int main() { return pass2b(); } +int main() +{ + return pass2b(); +} diff --git a/Tests/TryCompile/pass2b.cxx b/Tests/TryCompile/pass2b.cxx index 4c539e2..438e9e5 100644 --- a/Tests/TryCompile/pass2b.cxx +++ b/Tests/TryCompile/pass2b.cxx @@ -1 +1,4 @@ -extern "C" int pass2b(void) { return 0; } +extern "C" int pass2b(void) +{ + return 0; +} diff --git a/Tests/TryCompile/testdef.c b/Tests/TryCompile/testdef.c index 5401e71..b05f070 100644 --- a/Tests/TryCompile/testdef.c +++ b/Tests/TryCompile/testdef.c @@ -1,4 +1,7 @@ #ifndef TESTDEF -# error "TESTDEF should be defined!" +#error "TESTDEF should be defined!" #endif -int main(void) { return 0; } +int main(void) +{ + return 0; +} |