diff options
author | Brad King <brad.king@kitware.com> | 2014-02-20 18:26:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-21 20:32:13 (GMT) |
commit | 5aa9127574095f317a368d09c5a6bfb996ae792f (patch) | |
tree | a625f91e70f01dfcd66a7a302acb1e1e2babef47 /test | |
parent | 6e42c9c3e990082b135c9b4d5d8023fb8ae5d325 (diff) | |
download | CastXML-5aa9127574095f317a368d09c5a6bfb996ae792f.zip CastXML-5aa9127574095f317a368d09c5a6bfb996ae792f.tar.gz CastXML-5aa9127574095f317a368d09c5a6bfb996ae792f.tar.bz2 |
Restrict --castxml-gccxml to C++98 and C89 modes
The gccxml output format was designed for C++98 and does not support
constructs in C++11 or other newer language standards. Reject such
combinations up front. An alternative output format will be needed
for such interfaces.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 11 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c++11-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c++11-stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c++1y-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c++1y-stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c11-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c11-stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c99-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-c99-stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-objc1-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-objc1-stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-objc2-result.txt | 1 | ||||
-rw-r--r-- | test/expect/cmd.gccxml-and-objc2-stderr.txt | 1 | ||||
-rw-r--r-- | test/input/empty.c | 0 | ||||
-rw-r--r-- | test/input/empty.cxx | 0 | ||||
-rw-r--r-- | test/input/empty.m | 0 | ||||
-rw-r--r-- | test/input/empty.mm | 0 |
17 files changed, 23 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 905c90e..8e65bea 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -41,6 +41,11 @@ macro(castxml_test_gccxml test) ) endmacro() +set(empty_c ${CMAKE_CURRENT_LIST_DIR}/input/empty.c) +set(empty_cxx ${CMAKE_CURRENT_LIST_DIR}/input/empty.cxx) +set(empty_m ${CMAKE_CURRENT_LIST_DIR}/input/empty.m) +set(empty_mm ${CMAKE_CURRENT_LIST_DIR}/input/empty.mm) + castxml_test_cmd(no-arguments) castxml_test_cmd(cc-missing --castxml-cc-gnu) @@ -48,6 +53,12 @@ castxml_test_cmd(cc-twice --castxml-cc-msvc cl --castxml-cc-gnu gcc) castxml_test_cmd(cc-unknown --castxml-cc-unknown cc) castxml_test_cmd(gccxml-and-E --castxml-gccxml -E) castxml_test_cmd(gccxml-twice --castxml-gccxml --castxml-gccxml) +castxml_test_cmd(gccxml-and-c99 --castxml-gccxml -std=c99 ${empty_c}) +castxml_test_cmd(gccxml-and-c11 --castxml-gccxml -std=c11 ${empty_c}) +castxml_test_cmd(gccxml-and-c++11 --castxml-gccxml -std=c++11 ${empty_cxx}) +castxml_test_cmd(gccxml-and-c++1y --castxml-gccxml -std=c++1y ${empty_cxx}) +castxml_test_cmd(gccxml-and-objc1 --castxml-gccxml ${empty_m}) +castxml_test_cmd(gccxml-and-objc2 --castxml-gccxml ${empty_mm}) castxml_test_cmd(o-missing -o) castxml_test_cmd(start-missing --castxml-start) diff --git a/test/expect/cmd.gccxml-and-c++11-result.txt b/test/expect/cmd.gccxml-and-c++11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-c++11-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-c++11-stderr.txt b/test/expect/cmd.gccxml-and-c++11-stderr.txt new file mode 100644 index 0000000..c19941a --- /dev/null +++ b/test/expect/cmd.gccxml-and-c++11-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with c\+\+11$ diff --git a/test/expect/cmd.gccxml-and-c++1y-result.txt b/test/expect/cmd.gccxml-and-c++1y-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-c++1y-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-c++1y-stderr.txt b/test/expect/cmd.gccxml-and-c++1y-stderr.txt new file mode 100644 index 0000000..2505bc0 --- /dev/null +++ b/test/expect/cmd.gccxml-and-c++1y-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with c\+\+1y$ diff --git a/test/expect/cmd.gccxml-and-c11-result.txt b/test/expect/cmd.gccxml-and-c11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-c11-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-c11-stderr.txt b/test/expect/cmd.gccxml-and-c11-stderr.txt new file mode 100644 index 0000000..16c8c53 --- /dev/null +++ b/test/expect/cmd.gccxml-and-c11-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with c11$ diff --git a/test/expect/cmd.gccxml-and-c99-result.txt b/test/expect/cmd.gccxml-and-c99-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-c99-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-c99-stderr.txt b/test/expect/cmd.gccxml-and-c99-stderr.txt new file mode 100644 index 0000000..0f2887f --- /dev/null +++ b/test/expect/cmd.gccxml-and-c99-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with c99$ diff --git a/test/expect/cmd.gccxml-and-objc1-result.txt b/test/expect/cmd.gccxml-and-objc1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-objc1-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-objc1-stderr.txt b/test/expect/cmd.gccxml-and-objc1-stderr.txt new file mode 100644 index 0000000..55d2e80 --- /dev/null +++ b/test/expect/cmd.gccxml-and-objc1-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with Objective C$ diff --git a/test/expect/cmd.gccxml-and-objc2-result.txt b/test/expect/cmd.gccxml-and-objc2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/expect/cmd.gccxml-and-objc2-result.txt @@ -0,0 +1 @@ +1 diff --git a/test/expect/cmd.gccxml-and-objc2-stderr.txt b/test/expect/cmd.gccxml-and-objc2-stderr.txt new file mode 100644 index 0000000..55d2e80 --- /dev/null +++ b/test/expect/cmd.gccxml-and-objc2-stderr.txt @@ -0,0 +1 @@ +^error: '--castxml-gccxml' does not work with Objective C$ diff --git a/test/input/empty.c b/test/input/empty.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/input/empty.c diff --git a/test/input/empty.cxx b/test/input/empty.cxx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/input/empty.cxx diff --git a/test/input/empty.m b/test/input/empty.m new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/input/empty.m diff --git a/test/input/empty.mm b/test/input/empty.mm new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/input/empty.mm |