summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-19 14:47:30 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-19 14:53:30 (GMT)
commit2a865c4a19199c11e4837faa04951fc9eb6a0b77 (patch)
treecf0b9ac177d107a82c187a989cdba9417811eada /test
parent67e01959e94c8579e339c0d3f7acbed658950383 (diff)
downloadCastXML-2a865c4a19199c11e4837faa04951fc9eb6a0b77.zip
CastXML-2a865c4a19199c11e4837faa04951fc9eb6a0b77.tar.gz
CastXML-2a865c4a19199c11e4837faa04951fc9eb6a0b77.tar.bz2
Output: Indicate whether an Enumeration is scoped
Fixes: #94
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/expect/castxml1.any.Enumeration-scoped.xml.txt8
-rw-r--r--test/expect/gccxml.any.Enumeration-scoped.xml.txt8
-rw-r--r--test/input/Enumeration-scoped.cxx4
4 files changed, 21 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3c53f1e..910c24b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -460,6 +460,7 @@ castxml_test_output(Enumeration)
castxml_test_output(Enumeration-annotate)
castxml_test_output(Enumeration-deprecated)
castxml_test_output(Enumeration-anonymous)
+castxml_test_output_11(Enumeration-scoped)
castxml_test_output(Field)
castxml_test_output(Field-annotate)
castxml_test_output(Field-deprecated)
diff --git a/test/expect/castxml1.any.Enumeration-scoped.xml.txt b/test/expect/castxml1.any.Enumeration-scoped.xml.txt
new file mode 100644
index 0000000..d63f2d2
--- /dev/null
+++ b/test/expect/castxml1.any.Enumeration-scoped.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" scoped="1" size="[0-9]+" align="[0-9]+">
+ <EnumValue name="value" init="1"/>
+ </Enumeration>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Enumeration-scoped.cxx"/>
+</CastXML>$
diff --git a/test/expect/gccxml.any.Enumeration-scoped.xml.txt b/test/expect/gccxml.any.Enumeration-scoped.xml.txt
new file mode 100644
index 0000000..7e8d2d1
--- /dev/null
+++ b/test/expect/gccxml.any.Enumeration-scoped.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+ <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+">
+ <EnumValue name="value" init="1"/>
+ </Enumeration>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Enumeration-scoped.cxx"/>
+</GCC_XML>$
diff --git a/test/input/Enumeration-scoped.cxx b/test/input/Enumeration-scoped.cxx
new file mode 100644
index 0000000..66fd9cc
--- /dev/null
+++ b/test/input/Enumeration-scoped.cxx
@@ -0,0 +1,4 @@
+enum class start
+{
+ value = 1
+};