summaryrefslogtreecommitdiffstats
path: root/Tests/TryCompile
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Tests/TryCompile
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r--Tests/TryCompile/Inner/innerexe.c5
-rw-r--r--Tests/TryCompile/Inner/innerlib.c5
-rw-r--r--Tests/TryCompile/expect_arg.c16
-rw-r--r--Tests/TryCompile/fail2a.c5
-rw-r--r--Tests/TryCompile/pass.c2
-rw-r--r--Tests/TryCompile/pass2a.c5
-rw-r--r--Tests/TryCompile/pass2b.cxx5
-rw-r--r--Tests/TryCompile/testdef.c7
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;
+}