diff options
author | Brad King <brad.king@kitware.com> | 2015-12-10 15:11:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-12-10 15:11:47 (GMT) |
commit | 5a1627d41b70115c7558536be1eb95e493ac12cb (patch) | |
tree | 714c862687b8c550efd96f94fa9a5f3197d30d48 /test | |
parent | 2a87046db10851ff1b8e101ecc345657ce663c76 (diff) | |
download | CastXML-5a1627d41b70115c7558536be1eb95e493ac12cb.zip CastXML-5a1627d41b70115c7558536be1eb95e493ac12cb.tar.gz CastXML-5a1627d41b70115c7558536be1eb95e493ac12cb.tar.bz2 |
Output: Skip C++11 type alias declarations
The gccxml output format may contain only C++98 constructs.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/expect/gccxml.any.TypeAlias.xml.txt | 5 | ||||
-rw-r--r-- | test/expect/gccxml.any.TypeAliasTemplate.xml.txt | 5 | ||||
-rw-r--r-- | test/expect/gccxml.c++98.TypeAlias.stderr.txt | 1 | ||||
-rw-r--r-- | test/expect/gccxml.c++98.TypeAliasTemplate.stderr.txt | 1 | ||||
-rw-r--r-- | test/input/TypeAlias.cxx | 3 | ||||
-rw-r--r-- | test/input/TypeAliasTemplate.cxx | 4 |
7 files changed, 21 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b13fbb1..f83a182 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -292,6 +292,8 @@ castxml_test_gccxml(OperatorMethod-annotate) castxml_test_gccxml(PointerType) castxml_test_gccxml(ReferenceType) castxml_test_gccxml(RValueReferenceType) +castxml_test_gccxml(TypeAlias) +castxml_test_gccxml(TypeAliasTemplate) castxml_test_gccxml(Typedef-annotate) castxml_test_gccxml(Typedef-paren) castxml_test_gccxml(Typedef-to-Class-template) diff --git a/test/expect/gccxml.any.TypeAlias.xml.txt b/test/expect/gccxml.any.TypeAlias.xml.txt new file mode 100644 index 0000000..763161e --- /dev/null +++ b/test/expect/gccxml.any.TypeAlias.xml.txt @@ -0,0 +1,5 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Namespace id="_1" name="start" context="_2"/> + <Namespace id="_2" name="::"/> +</GCC_XML>$ diff --git a/test/expect/gccxml.any.TypeAliasTemplate.xml.txt b/test/expect/gccxml.any.TypeAliasTemplate.xml.txt new file mode 100644 index 0000000..763161e --- /dev/null +++ b/test/expect/gccxml.any.TypeAliasTemplate.xml.txt @@ -0,0 +1,5 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Namespace id="_1" name="start" context="_2"/> + <Namespace id="_2" name="::"/> +</GCC_XML>$ diff --git a/test/expect/gccxml.c++98.TypeAlias.stderr.txt b/test/expect/gccxml.c++98.TypeAlias.stderr.txt new file mode 100644 index 0000000..02b944f --- /dev/null +++ b/test/expect/gccxml.c++98.TypeAlias.stderr.txt @@ -0,0 +1 @@ +warning: alias declarations are a C\+\+11 extension diff --git a/test/expect/gccxml.c++98.TypeAliasTemplate.stderr.txt b/test/expect/gccxml.c++98.TypeAliasTemplate.stderr.txt new file mode 100644 index 0000000..02b944f --- /dev/null +++ b/test/expect/gccxml.c++98.TypeAliasTemplate.stderr.txt @@ -0,0 +1 @@ +warning: alias declarations are a C\+\+11 extension diff --git a/test/input/TypeAlias.cxx b/test/input/TypeAlias.cxx new file mode 100644 index 0000000..8e5470c --- /dev/null +++ b/test/input/TypeAlias.cxx @@ -0,0 +1,3 @@ +namespace start { + using type = int; +} diff --git a/test/input/TypeAliasTemplate.cxx b/test/input/TypeAliasTemplate.cxx new file mode 100644 index 0000000..ec54f80 --- /dev/null +++ b/test/input/TypeAliasTemplate.cxx @@ -0,0 +1,4 @@ +template <typename T> struct A { typedef T type; }; +namespace start { + template <typename T> using type = typename A<T>::type; +} |