summaryrefslogtreecommitdiff
path: root/Tests/NewlineArgs
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/NewlineArgs')
-rw-r--r--Tests/NewlineArgs/CMakeLists.txt16
-rw-r--r--Tests/NewlineArgs/cxxonly.cxx19
-rw-r--r--Tests/NewlineArgs/libcxx1.cxx10
-rw-r--r--Tests/NewlineArgs/libcxx1.h9
-rw-r--r--Tests/NewlineArgs/libcxx2.h.in6
5 files changed, 60 insertions, 0 deletions
diff --git a/Tests/NewlineArgs/CMakeLists.txt b/Tests/NewlineArgs/CMakeLists.txt
new file mode 100644
index 000000000..a18230488
--- /dev/null
+++ b/Tests/NewlineArgs/CMakeLists.txt
@@ -0,0 +1,16 @@
+# a simple CXX only test case
+cmake_minimum_required (VERSION 2.6)
+project (NewlineArgs CXX)
+
+add_definitions("-DTEST_FLAG_1
+-DTEST_FLAG_2")
+
+include_directories(" ${NewlineArgs_BINARY_DIR}
+ ${NewlineArgs_SOURCE_DIR} ")
+
+configure_file("${NewlineArgs_SOURCE_DIR}/libcxx2.h.in"
+ "${NewlineArgs_BINARY_DIR}/libcxx2.h")
+
+add_library(testcxx1 libcxx1.cxx)
+add_executable (NewlineArgs cxxonly.cxx)
+target_link_libraries(NewlineArgs testcxx1)
diff --git a/Tests/NewlineArgs/cxxonly.cxx b/Tests/NewlineArgs/cxxonly.cxx
new file mode 100644
index 000000000..05d55e4ef
--- /dev/null
+++ b/Tests/NewlineArgs/cxxonly.cxx
@@ -0,0 +1,19 @@
+#include "libcxx1.h"
+#include "libcxx2.h"
+
+#include <stdio.h>
+
+int main ()
+{
+ if ( LibCxx1Class::Method() != 2.0 )
+ {
+ printf("Problem with libcxx1\n");
+ return 1;
+ }
+#ifdef TEST_FLAG_3
+ return 0;
+#else
+ printf("Problem with libcxx2.h include dir probably!\n");
+ return 1;
+#endif
+}
diff --git a/Tests/NewlineArgs/libcxx1.cxx b/Tests/NewlineArgs/libcxx1.cxx
new file mode 100644
index 000000000..72f171d5c
--- /dev/null
+++ b/Tests/NewlineArgs/libcxx1.cxx
@@ -0,0 +1,10 @@
+#include "libcxx1.h"
+
+#ifdef TEST_FLAG_1
+#ifdef TEST_FLAG_2
+float LibCxx1Class::Method()
+{
+ return 2.0;
+}
+#endif
+#endif
diff --git a/Tests/NewlineArgs/libcxx1.h b/Tests/NewlineArgs/libcxx1.h
new file mode 100644
index 000000000..ea094d758
--- /dev/null
+++ b/Tests/NewlineArgs/libcxx1.h
@@ -0,0 +1,9 @@
+class LibCxx1Class
+{
+public:
+#ifdef TEST_FLAG_1
+#ifdef TEST_FLAG_2
+ static float Method();
+#endif
+#endif
+};
diff --git a/Tests/NewlineArgs/libcxx2.h.in b/Tests/NewlineArgs/libcxx2.h.in
new file mode 100644
index 000000000..bdf9cfa93
--- /dev/null
+++ b/Tests/NewlineArgs/libcxx2.h.in
@@ -0,0 +1,6 @@
+#ifdef TEST_FLAG_1
+#ifdef TEST_FLAG_2
+#define TEST_FLAG_3
+#endif
+#endif
+