summaryrefslogtreecommitdiffstats
path: root/Tests/OutOfSource
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/OutOfSource
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/OutOfSource')
-rw-r--r--Tests/OutOfSource/OutOfSourceSubdir/simple.cxx29
-rw-r--r--Tests/OutOfSource/OutOfSourceSubdir/testlib.h12
-rw-r--r--Tests/OutOfSource/SubDir/subdir.c5
-rw-r--r--Tests/OutOfSource/simple.cxx5
4 files changed, 26 insertions, 25 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
index 69d7c82..12cbd1a 100644
--- a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
+++ b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
@@ -10,30 +10,25 @@ extern int simple2();
#endif
extern "C" int outlib();
-int main ()
+int main()
{
- if(simple() != 123)
- {
+ if (simple() != 123) {
return -3;
- }
- if (strcmp(animal,"SIZZLING"))
- {
- fprintf(stderr,"Get definitions from a subdir did not work\n");
+ }
+ if (strcmp(animal, "SIZZLING")) {
+ fprintf(stderr, "Get definitions from a subdir did not work\n");
return -2;
- }
- if(TestLib() != 1.0)
- {
+ }
+ if (TestLib() != 1.0) {
return -1;
- }
- if(outlib() != 456)
- {
+ }
+ if (outlib() != 456) {
return -4;
- }
+ }
#ifndef NO_DEEPSRC
- if(simple2() != 789)
- {
+ if (simple2() != 789) {
return -5;
- }
+ }
#endif
return 0;
}
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/testlib.h b/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
index 75c2d84..bacf5a1 100644
--- a/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
+++ b/Tests/OutOfSource/OutOfSourceSubdir/testlib.h
@@ -1,11 +1,11 @@
#ifdef _WIN32
-# ifdef testlib_EXPORTS
-# define CM_TEST_LIB_EXPORT __declspec( dllexport )
-# else
-# define CM_TEST_LIB_EXPORT __declspec( dllimport )
-# endif
+#ifdef testlib_EXPORTS
+#define CM_TEST_LIB_EXPORT __declspec(dllexport)
#else
-# define CM_TEST_LIB_EXPORT
+#define CM_TEST_LIB_EXPORT __declspec(dllimport)
+#endif
+#else
+#define CM_TEST_LIB_EXPORT
#endif
CM_TEST_LIB_EXPORT float TestLib();
diff --git a/Tests/OutOfSource/SubDir/subdir.c b/Tests/OutOfSource/SubDir/subdir.c
index 0d0d827..abf4e18 100644
--- a/Tests/OutOfSource/SubDir/subdir.c
+++ b/Tests/OutOfSource/SubDir/subdir.c
@@ -1 +1,4 @@
-int subdir(void) { return 0; }
+int subdir(void)
+{
+ return 0;
+}
diff --git a/Tests/OutOfSource/simple.cxx b/Tests/OutOfSource/simple.cxx
index 27e79f4..ffe0db9 100644
--- a/Tests/OutOfSource/simple.cxx
+++ b/Tests/OutOfSource/simple.cxx
@@ -1 +1,4 @@
-int simple() { return 123; }
+int simple()
+{
+ return 123;
+}