summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Executable/complex.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:18:39 (GMT)
commit7bbaa4283de26864b2e55e819db0884771585467 (patch)
treeecb748dbe41a13d8bdea77acd0049cde999d933e /Tests/Complex/Executable/complex.cxx
parentbe9db98946b7918f279812fd0616abb650eebed0 (diff)
downloadCMake-7bbaa4283de26864b2e55e819db0884771585467.zip
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.bz2
Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
Diffstat (limited to 'Tests/Complex/Executable/complex.cxx')
-rw-r--r--Tests/Complex/Executable/complex.cxx132
1 files changed, 66 insertions, 66 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 1901d99..27d70ad 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -33,7 +33,7 @@ int cm_failed = 0;
void cmFailed(const char* Message, const char* m2= "", const char* m3 = "")
{
- std::cout << "FAILED: " << Message << m2 << m3 << "\n";
+ std::cout << "FAILED: " << Message << m2 << m3 << "\n";
cm_failed++;
}
@@ -41,7 +41,7 @@ void cmFailed(const char* Message, const char* m2= "", const char* m3 = "")
void cmPassed(const char* Message, const char* m2="")
{
- std::cout << "Passed: " << Message << m2 << "\n";
+ std::cout << "Passed: " << Message << m2 << "\n";
cm_passed++;
}
@@ -67,7 +67,7 @@ void cmPassed(const char* Message, const char* m2="")
// ======================================================================
-void TestAndRemoveFile(const char* filename)
+void TestAndRemoveFile(const char* filename)
{
struct stat st;
if(stat(filename, &st) < 0)
@@ -89,7 +89,7 @@ void TestAndRemoveFile(const char* filename)
// ======================================================================
-void TestDir(const char* filename)
+void TestDir(const char* filename)
{
struct stat st;
if(stat(filename, &st) < 0 || !S_ISDIR(st.st_mode))
@@ -113,7 +113,7 @@ void ForceStringUse()
std::string cachetest = CACHE_TEST_VAR_INTERNAL;
v.push_back(cachetest);
v2 = v;
- std::string x(5,'x');
+ std::string x(5,'x');
char buff[5];
x.copy(buff, 1, 0);
x[0] = 'a';
@@ -165,7 +165,7 @@ int main()
#else
cmPassed("COMPILE_FLAGS did work with SET_TARGET_PROPERTIES");
#endif
-
+
#ifdef ELSEIF_RESULT
cmPassed("ELSEIF did work");
#else
@@ -228,8 +228,8 @@ int main()
#else
cmPassed("CMAKE_IS_FUN is defined.");
#endif
-
-#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4)
+
+#if defined(CMAKE_ARGV1) && defined(CMAKE_ARGV2) && defined(CMAKE_ARGV3) && defined(CMAKE_ARGV4)
cmPassed("Variable args for MACROs are working.");
#else
cmFailed("Variable args for MACROs are failing.");
@@ -250,7 +250,7 @@ int main()
#else
cmPassed("CMake found the parent directory properly");
#endif
-
+
// ----------------------------------------------------------------------
// Test GET_DIRECTORY_PROPERTY for listfiles
#ifndef CMAKE_FOUND_LISTFILE_STACK
@@ -258,7 +258,7 @@ int main()
#else
cmPassed("CMake found the listfile stack properly");
#endif
-
+
// ----------------------------------------------------------------------
// Test SET, VARIABLE_REQUIRES
@@ -267,38 +267,38 @@ int main()
#else
cmPassed("SHOULD_NOT_BE_DEFINED is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED is defined.");
#endif
-
+
#ifndef ONE_VAR
cmFailed("cmakedefine is broken, ONE_VAR is not defined.");
#else
cmPassed("ONE_VAR is defined.");
#endif
-
+
#ifndef ONE_VAR_IS_DEFINED
cmFailed("cmakedefine, SET or VARIABLE_REQUIRES is broken, "
"ONE_VAR_IS_DEFINED is not defined.");
#else
cmPassed("ONE_VAR_IS_DEFINED is defined.");
#endif
-
+
#ifdef ZERO_VAR
cmFailed("cmakedefine is broken, ZERO_VAR is defined.");
#else
cmPassed("ZERO_VAR is not defined.");
#endif
-
+
#ifndef STRING_VAR
cmFailed("the CONFIGURE_FILE command is broken, STRING_VAR is not defined.");
#else
if(strcmp(STRING_VAR, "CMake is great") != 0)
{
- cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ",
+ cmFailed("the SET or CONFIGURE_FILE command is broken. STRING_VAR == ",
STRING_VAR);
}
else
@@ -315,145 +315,145 @@ int main()
#else
cmPassed("SHOULD_NOT_BE_DEFINED_NOT is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_NOT
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_NOT is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_NOT2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_NOT2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_NOT2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_NOT2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_AND
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_AND is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_AND
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_AND is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_AND2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_AND2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_AND2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_AND2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_OR
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_OR is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_OR
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_OR is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_OR2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_OR2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_OR2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_OR2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_MATCHES
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_MATCHES
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_MATCHES is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_MATCHES2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_MATCHES2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_MATCHES2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_COMMAND
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_COMMAND
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_COMMAND is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_COMMAND2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_COMMAND2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_COMMAND2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_EXISTS
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_EXISTS
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_EXISTS is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_EXISTS2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EXISTS2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_EXISTS2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_EXISTS2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EXISTS2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_IS_DIRECTORY
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_IS_DIRECTORY is not defined.\n");
#else
@@ -471,31 +471,31 @@ int main()
#else
cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_LESS
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_LESS is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_LESS2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_LESS2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_LESS2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_GREATER
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
#else
@@ -513,67 +513,67 @@ int main()
#else
cmPassed("SHOULD_BE_DEFINED_GREATER is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_GREATER2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_GREATER2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_STRLESS
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_STRLESS
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_STRLESS2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_STRLESS2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_STRGREATER
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined.");
#endif
-
+
#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined.");
#else
cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined.");
#endif
-
+
#ifndef SHOULD_BE_DEFINED_STRGREATER2
cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined.");
#endif
-
+
// ----------------------------------------------------------------------
// Test FOREACH
@@ -624,7 +624,7 @@ int main()
// ----------------------------------------------------------------------
// Test WHILE
-
+
if(WHILE_VALUE != 1000)
{
cmFailed("WHILE command is not working");
@@ -814,7 +814,7 @@ int main()
// only created during a build.
TestAndRemoveFile(BINARY_DIR "/Library/custom_target1.txt");
-
+
// ----------------------------------------------------------------------
// A directory has been created.
@@ -890,7 +890,7 @@ int main()
#else
if(strcmp(FILE_COMPILE_FLAGS, "-foo -bar") != 0)
{
- cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ",
+ cmFailed("the SET_SOURCE_FILES_PROPERTIES or CONFIGURE_FILE command is broken. FILE_COMPILE_FLAGS == ",
FILE_COMPILE_FLAGS);
}
else
@@ -908,7 +908,7 @@ int main()
std::cout << "REGISTRY_TEST_PATH == " << REGISTRY_TEST_PATH << "\n";
if(stricmp(REGISTRY_TEST_PATH, BINARY_DIR "/registry_dir") != 0)
{
- cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ",
+ cmFailed("the 'read registry value' function or CONFIGURE_FILE command is broken. REGISTRY_TEST_PATH == ",
REGISTRY_TEST_PATH, " is not " BINARY_DIR "/registry_dir");
}
else
@@ -937,7 +937,7 @@ int main()
{
cmFailed("REMOVE is not working");
}
-
+
// ----------------------------------------------------------------------
// Test SEPARATE_ARGUMENTS
if(strcmp("a;b;c", TEST_SEP) == 0)
@@ -948,7 +948,7 @@ int main()
{
cmFailed("SEPARATE_ARGUMENTS is not working");
}
-
+
// ----------------------------------------------------------------------
// Test Escape Quotes
if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0)
@@ -959,8 +959,8 @@ int main()
{
cmFailed("ESCAPE_QUOTES is not working");
}
-
-
+
+
// ----------------------------------------------------------------------
// Test if IF command inside a FOREACH works.
#if defined(IF_INSIDE_FOREACH_THEN_EXECUTED) && !defined(IF_INSIDE_FOREACH_ELSE_EXECUTED)
@@ -981,7 +981,7 @@ int main()
else
{
cmFailed("cmakedefine01 is not working for 0");
- }
+ }
if(SHOULD_BE_ONE == 1)
{
cmPassed("cmakedefine01 is working for 1");
@@ -989,7 +989,7 @@ int main()
else
{
cmFailed("cmakedefine01 is not working for 1");
- }
+ }
#ifdef FORCE_TEST
cmFailed("CMake SET CACHE FORCE");
#else