summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-02 18:40:45 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-02 18:46:37 (GMT)
commit7acd634c8ab5349a4946bbfe66e24e4ce30f90b9 (patch)
tree447026c0c603f23a938537494f40ff9579dd478f /test
parenta2b9e1a10c9bedc8a2212096bc10206ed4bfce60 (diff)
downloadCastXML-7acd634c8ab5349a4946bbfe66e24e4ce30f90b9.zip
CastXML-7acd634c8ab5349a4946bbfe66e24e4ce30f90b9.tar.gz
CastXML-7acd634c8ab5349a4946bbfe66e24e4ce30f90b9.tar.bz2
castxml: Support -std=c++14 with --castxml-gccxml
Drop the rejection of -std=c++14 and --castxml-gccxml together. Extend the test suite to run all gccxml output format tests in -std=c++14 mode to verify the behavior of the mode is as close as possible to other modes. For the few tests that have c++11-specific expected output, use it for c++14 expected output too.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt10
-rw-r--r--test/expect/cmd.gccxml-and-c++14.result.txt1
-rw-r--r--test/expect/cmd.gccxml-and-c++14.stderr.txt1
-rw-r--r--test/expect/gccxml.c++14.Class-bases.xml.txt57
-rw-r--r--test/expect/gccxml.c++14.Class-template-bases.xml.txt44
5 files changed, 111 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 7c23299..b85b49a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -75,6 +75,10 @@ macro(castxml_test_gccxml_cxx11 test)
castxml_test_gccxml_common(gccxml cxx c++11 ${test})
endmacro()
+macro(castxml_test_gccxml_cxx14 test)
+ castxml_test_gccxml_common(gccxml cxx c++14 ${test})
+endmacro()
+
macro(castxml_test_gccxml_broken_cxx98 test)
castxml_test_gccxml_common(gccxml.broken cxx c++98 ${test})
endmacro()
@@ -83,6 +87,10 @@ macro(castxml_test_gccxml_broken_cxx11 test)
castxml_test_gccxml_common(gccxml.broken cxx c++11 ${test})
endmacro()
+macro(castxml_test_gccxml_broken_cxx14 test)
+ castxml_test_gccxml_common(gccxml.broken cxx c++14 ${test})
+endmacro()
+
macro(castxml_test_gccxml_c test)
castxml_test_gccxml_c89(${test})
endmacro()
@@ -90,11 +98,13 @@ endmacro()
macro(castxml_test_gccxml test)
castxml_test_gccxml_cxx98(${test})
castxml_test_gccxml_cxx11(${test})
+ castxml_test_gccxml_cxx14(${test})
endmacro()
macro(castxml_test_gccxml_broken test)
castxml_test_gccxml_broken_cxx98(${test})
castxml_test_gccxml_broken_cxx11(${test})
+ castxml_test_gccxml_broken_cxx14(${test})
endmacro()
set(input ${CMAKE_CURRENT_LIST_DIR}/input)
diff --git a/test/expect/cmd.gccxml-and-c++14.result.txt b/test/expect/cmd.gccxml-and-c++14.result.txt
deleted file mode 100644
index d00491f..0000000
--- a/test/expect/cmd.gccxml-and-c++14.result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/expect/cmd.gccxml-and-c++14.stderr.txt b/test/expect/cmd.gccxml-and-c++14.stderr.txt
deleted file mode 100644
index 76ed9ea..0000000
--- a/test/expect/cmd.gccxml-and-c++14.stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^error: '--castxml-gccxml' does not work with c\+\+14$
diff --git a/test/expect/gccxml.c++14.Class-bases.xml.txt b/test/expect/gccxml.c++14.Class-bases.xml.txt
new file mode 100644
index 0000000..c9535df
--- /dev/null
+++ b/test/expect/gccxml.c++14.Class-bases.xml.txt
@@ -0,0 +1,57 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:4" file="f1" line="4" members="_3 _4 _5 _6" bases="_7 private:_8 protected:_9" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0"/>
+ <Base type="_8" access="private" virtual="0"/>
+ <Base type="_9" access="protected" virtual="1"/>
+ </Class>
+ <OperatorMethod id="_3" name="=" returns="_10" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_11" location="f1:4" file="f1" line="4"/>
+ </OperatorMethod>
+ <Destructor id="_4" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1">
+ <Argument type="_11" location="f1:4" file="f1" line="4"/>
+ </Constructor>
+ <Class id="_7" name="base_public" context="_2" location="f1:1" file="f1" line="1" members="_12 _13 _14 _15" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_8" name="base_private" context="_2" location="f1:2" file="f1" line="2" members="_16 _17 _18 _19" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_9" name="base_protected" context="_2" location="f1:3" file="f1" line="3" members="_20 _21 _22 _23" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1"/>
+ <ReferenceType id="_11" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <OperatorMethod id="_12" name="=" returns="_24" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_25" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_13" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"/>
+ <Constructor id="_14" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"/>
+ <Constructor id="_15" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1">
+ <Argument type="_25" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_16" name="=" returns="_26" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_27" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_17" name="base_private" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <Constructor id="_18" name="base_private" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <Constructor id="_19" name="base_private" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1">
+ <Argument type="_27" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <OperatorMethod id="_20" name="=" returns="_28" context="_9" access="public" location="f1:3" file="f1" line="3" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_29" location="f1:3" file="f1" line="3"/>
+ </OperatorMethod>
+ <Destructor id="_21" name="base_protected" context="_9" access="public" location="f1:3" file="f1" line="3" inline="1" artificial="1"/>
+ <Constructor id="_22" name="base_protected" context="_9" access="public" location="f1:3" file="f1" line="3" inline="1" artificial="1"/>
+ <Constructor id="_23" name="base_protected" context="_9" access="public" location="f1:3" file="f1" line="3" inline="1" artificial="1">
+ <Argument type="_29" location="f1:3" file="f1" line="3"/>
+ </Constructor>
+ <ReferenceType id="_24" type="_7"/>
+ <ReferenceType id="_25" type="_7c"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <ReferenceType id="_26" type="_8"/>
+ <ReferenceType id="_27" type="_8c"/>
+ <CvQualifiedType id="_8c" type="_8" const="1"/>
+ <ReferenceType id="_28" type="_9"/>
+ <ReferenceType id="_29" type="_9c"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-bases.cxx"/>
+</GCC_XML>$
diff --git a/test/expect/gccxml.c++14.Class-template-bases.xml.txt b/test/expect/gccxml.c++14.Class-template-bases.xml.txt
new file mode 100644
index 0000000..33f0acc
--- /dev/null
+++ b/test/expect/gccxml.c++14.Class-template-bases.xml.txt
@@ -0,0 +1,44 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:4" file="f1" line="4" members="_3 _4 _5 _6" bases="_7 _8" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0"/>
+ <Base type="_8" access="public" virtual="0"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1">
+ <Argument type="_9" location="f1:4" file="f1" line="4"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:4" file="f1" line="4"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Class id="_7" name="non_dependent_base" context="_2" location="f1:1" file="f1" line="1" members="_11 _12 _13 _14" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_8" name="dependent_base&lt;int&gt;" context="_2" location="f1:2" file="f1" line="2" members="_15 _16 _17 _18" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Constructor id="_11" name="non_dependent_base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"/>
+ <Constructor id="_12" name="non_dependent_base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1">
+ <Argument type="_19" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_13" name="=" returns="_20" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_19" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_14" name="non_dependent_base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"/>
+ <Constructor id="_15" name="dependent_base" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <Constructor id="_16" name="dependent_base" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1">
+ <Argument type="_21" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <OperatorMethod id="_17" name="=" returns="_22" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_21" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_18" name="dependent_base" context="_8" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"/>
+ <ReferenceType id="_19" type="_7c"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <ReferenceType id="_20" type="_7"/>
+ <ReferenceType id="_21" type="_8c"/>
+ <CvQualifiedType id="_8c" type="_8" const="1"/>
+ <ReferenceType id="_22" type="_8"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-bases.cxx"/>
+</GCC_XML>$