summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichka Popoff <michkapopoff@gmail.com>2016-11-22 21:00:20 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-09 16:38:05 (GMT)
commit40b05b2e4d7a1b08a619e47d6eab6f3bad83471f (patch)
treea276ec0ca0e7b592333ded1580726232086be8d9 /test
parent5e13767fcccee40991f7a31af71a877cc5163957 (diff)
downloadCastXML-40b05b2e4d7a1b08a619e47d6eab6f3bad83471f.zip
CastXML-40b05b2e4d7a1b08a619e47d6eab6f3bad83471f.tar.gz
CastXML-40b05b2e4d7a1b08a619e47d6eab6f3bad83471f.tar.bz2
test: Run all gccxml-format test cases as castxml-format cases too
Run all `gccxml.*` test cases as `castxml1.*` test cases covering output format with `--castxml-output=1`. Produce the expected test output files as follows: (cd test/expect && rename 's/^gccxml/castxml1/' gccxml.*) && git checkout test/expect && sed -i 's/GCC_XML/CastXML/' test/expect/castxml1.* This covers the current behavior of having both formats identical except for the root element. Later the new format outputs can be adapted as the format is changed.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt27
-rw-r--r--test/expect/castxml1.any.ArrayType-incomplete.xml.txt8
-rw-r--r--test/expect/castxml1.any.ArrayType.xml.txt8
-rw-r--r--test/expect/castxml1.any.CXXLiteral.xml.txt5
-rw-r--r--test/expect/castxml1.any.Class-abstract.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-annotate.xml.txt17
-rw-r--r--test/expect/castxml1.any.Class-base-offset.xml.txt11
-rw-r--r--test/expect/castxml1.any.Class-base-typedef.xml.txt31
-rw-r--r--test/expect/castxml1.any.Class-forward.xml.txt17
-rw-r--r--test/expect/castxml1.any.Class-friends.xml.txt20
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-access-mutable.xml.txt24
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-access.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-array.xml.txt20
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-bad-base.xml.txt26
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-const-aggregate.xml.txt15
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-const.xml.txt16
-rw-r--r--test/expect/castxml1.any.Class-implicit-member-reference.xml.txt16
-rw-r--r--test/expect/castxml1.any.Class-implicit-members.xml.txt20
-rw-r--r--test/expect/castxml1.any.Class-incomplete-twice.xml.txt7
-rw-r--r--test/expect/castxml1.any.Class-incomplete.xml.txt6
-rw-r--r--test/expect/castxml1.any.Class-member-template-access.xml.txt31
-rw-r--r--test/expect/castxml1.any.Class-member-template.xml.txt21
-rw-r--r--test/expect/castxml1.any.Class-partial-template-member-Typedef.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-template-Method-Argument-const.xml.txt24
-rw-r--r--test/expect/castxml1.any.Class-template-Method-Argument-default.xml.txt21
-rw-r--r--test/expect/castxml1.any.Class-template-Method-return-const.xml.txt20
-rw-r--r--test/expect/castxml1.any.Class-template-constructor-template.xml.txt20
-rw-r--r--test/expect/castxml1.any.Class-template-friends.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-template-member-Typedef-const.xml.txt23
-rw-r--r--test/expect/castxml1.any.Class-template-member-Typedef.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-template-member-nontemplate-Typedef.xml.txt10
-rw-r--r--test/expect/castxml1.any.Class-template-member-template.xml.txt22
-rw-r--r--test/expect/castxml1.any.Class-template-recurse.xml.txt18
-rw-r--r--test/expect/castxml1.any.Class-template.xml.txt30
-rw-r--r--test/expect/castxml1.any.Class.xml.txt17
-rw-r--r--test/expect/castxml1.any.Constructor-annotate.xml.txt17
-rw-r--r--test/expect/castxml1.any.Constructor.xml.txt17
-rw-r--r--test/expect/castxml1.any.Converter-annotate.xml.txt19
-rw-r--r--test/expect/castxml1.any.Converter.xml.txt19
-rw-r--r--test/expect/castxml1.any.CvQualifiedType.xml.txt8
-rw-r--r--test/expect/castxml1.any.Destructor-annotate.xml.txt17
-rw-r--r--test/expect/castxml1.any.Destructor.xml.txt17
-rw-r--r--test/expect/castxml1.any.Enumeration-annotate.xml.txt8
-rw-r--r--test/expect/castxml1.any.Enumeration-anonymous.xml.txt10
-rw-r--r--test/expect/castxml1.any.Enumeration.xml.txt9
-rw-r--r--test/expect/castxml1.any.Field-annotate.xml.txt19
-rw-r--r--test/expect/castxml1.any.Field.xml.txt22
-rw-r--r--test/expect/castxml1.any.Function-Argument-Annotate.xml.txt10
-rw-r--r--test/expect/castxml1.any.Function-Argument-decay.xml.txt17
-rw-r--r--test/expect/castxml1.any.Function-Argument-default-cast.xml.txt48
-rw-r--r--test/expect/castxml1.any.Function-Argument-default-ns.xml.txt17
-rw-r--r--test/expect/castxml1.any.Function-Argument-default.xml.txt14
-rw-r--r--test/expect/castxml1.any.Function-annotate.xml.txt10
-rw-r--r--test/expect/castxml1.any.Function-calling-convention-ms-annotate.xml.txt26
-rw-r--r--test/expect/castxml1.any.Function-calling-convention-ms.xml.txt26
-rw-r--r--test/expect/castxml1.any.Function-rvalue-reference.xml.txt9
-rw-r--r--test/expect/castxml1.any.Function-template.xml.txt13
-rw-r--r--test/expect/castxml1.any.Function-throw.xml.txt11
-rw-r--r--test/expect/castxml1.any.Function-variadic.xml.txt11
-rw-r--r--test/expect/castxml1.any.Function.xml.txt10
-rw-r--r--test/expect/castxml1.any.FunctionType-variadic.xml.txt12
-rw-r--r--test/expect/castxml1.any.FunctionType.xml.txt11
-rw-r--r--test/expect/castxml1.any.FundamentalType.xml.txt7
-rw-r--r--test/expect/castxml1.any.FundamentalTypes.xml.txt32
-rw-r--r--test/expect/castxml1.any.GNU-float128-nostart.xml.txt5
-rw-r--r--test/expect/castxml1.any.GNU-float128.xml.txt14
-rw-r--r--test/expect/castxml1.any.GNU-va_arg_pack.xml.txt10
-rw-r--r--test/expect/castxml1.any.Method-Argument-default-cast.xml.txt27
-rw-r--r--test/expect/castxml1.any.Method-Argument-default.xml.txt23
-rw-r--r--test/expect/castxml1.any.Method-annotate.xml.txt21
-rw-r--r--test/expect/castxml1.any.Method-overrides.xml.txt38
-rw-r--r--test/expect/castxml1.any.Method-rvalue-reference.xml.txt18
-rw-r--r--test/expect/castxml1.any.Method.xml.txt21
-rw-r--r--test/expect/castxml1.any.MethodType-cv.xml.txt13
-rw-r--r--test/expect/castxml1.any.MethodType.xml.txt12
-rw-r--r--test/expect/castxml1.any.Namespace-Class-members.xml.txt20
-rw-r--r--test/expect/castxml1.any.Namespace-Class-partial-template-members.xml.txt5
-rw-r--r--test/expect/castxml1.any.Namespace-Class-template-members.xml.txt5
-rw-r--r--test/expect/castxml1.any.Namespace-Function-template-members.xml.txt5
-rw-r--r--test/expect/castxml1.any.Namespace-anonymous.xml.txt8
-rw-r--r--test/expect/castxml1.any.Namespace-empty.xml.txt5
-rw-r--r--test/expect/castxml1.any.Namespace-extern-C-members.xml.txt11
-rw-r--r--test/expect/castxml1.any.Namespace-inline-start.xml.txt3
-rw-r--r--test/expect/castxml1.any.Namespace-inline-template.xml.txt9
-rw-r--r--test/expect/castxml1.any.Namespace-inline.xml.txt8
-rw-r--r--test/expect/castxml1.any.Namespace-nested-1.xml.txt11
-rw-r--r--test/expect/castxml1.any.Namespace-nested-2.xml.txt11
-rw-r--r--test/expect/castxml1.any.Namespace-nested.xml.txt13
-rw-r--r--test/expect/castxml1.any.Namespace-repeat-start.xml.txt9
-rw-r--r--test/expect/castxml1.any.Namespace-repeat.xml.txt10
-rw-r--r--test/expect/castxml1.any.Namespace.xml.txt5
-rw-r--r--test/expect/castxml1.any.OffsetType-cv.xml.txt11
-rw-r--r--test/expect/castxml1.any.OffsetType.xml.txt9
-rw-r--r--test/expect/castxml1.any.OperatorFunction-annotate.xml.txt13
-rw-r--r--test/expect/castxml1.any.OperatorFunction.xml.txt13
-rw-r--r--test/expect/castxml1.any.OperatorMethod-annotate.xml.txt21
-rw-r--r--test/expect/castxml1.any.OperatorMethod.xml.txt21
-rw-r--r--test/expect/castxml1.any.PointerType.xml.txt8
-rw-r--r--test/expect/castxml1.any.RValueReferenceType.xml.txt5
-rw-r--r--test/expect/castxml1.any.ReferenceType.xml.txt8
-rw-r--r--test/expect/castxml1.any.TypeAlias.xml.txt5
-rw-r--r--test/expect/castxml1.any.TypeAliasTemplate.xml.txt5
-rw-r--r--test/expect/castxml1.any.Typedef-annotate.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-paren.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-to-Class-template.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-to-FundamentalType-mode.xml.txt7
-rw-r--r--test/expect/castxml1.any.Typedef-to-extern-C-FundamentalType-mode.xml.txt7
-rw-r--r--test/expect/castxml1.any.Variable-annotate.xml.txt7
-rw-r--r--test/expect/castxml1.any.Variable-in-Class.xml.txt19
-rw-r--r--test/expect/castxml1.any.Variable-init-cast.xml.txt10
-rw-r--r--test/expect/castxml1.any.Variable-init-ns.xml.txt10
-rw-r--r--test/expect/castxml1.any.Variable-init.xml.txt12
-rw-r--r--test/expect/castxml1.any.Variable.xml.txt7
-rw-r--r--test/expect/castxml1.any.implicit-decl-ms.xml.txt11
-rw-r--r--test/expect/castxml1.any.inline-asm-ms.xml.txt7
-rw-r--r--test/expect/castxml1.any.invalid-decl-for-type.xml.txt32
-rw-r--r--test/expect/castxml1.any.nostart.xml.txt10
-rw-r--r--test/expect/castxml1.any.qualified-type-name.xml.txt9
-rw-r--r--test/expect/castxml1.any.using-declaration-class.xml.txt39
-rw-r--r--test/expect/castxml1.any.using-declaration-ns.xml.txt7
-rw-r--r--test/expect/castxml1.any.using-declaration-start.xml.txt7
-rw-r--r--test/expect/castxml1.any.using-directive-ns.xml.txt5
-rw-r--r--test/expect/castxml1.any.using-directive-start.xml.txt7
-rw-r--r--test/expect/castxml1.broken.any.ReferenceType-to-Class-template.xml.txt25
-rw-r--r--test/expect/castxml1.c++11.Class-bases.xml.txt57
-rw-r--r--test/expect/castxml1.c++11.Class-template-bases.xml.txt44
-rw-r--r--test/expect/castxml1.c++14.Class-bases.xml.txt57
-rw-r--r--test/expect/castxml1.c++14.Class-template-bases.xml.txt44
-rw-r--r--test/expect/castxml1.c++98.CXXLiteral.result.txt1
-rw-r--r--test/expect/castxml1.c++98.CXXLiteral.stderr.txt1
-rw-r--r--test/expect/castxml1.c++98.CXXLiteral.xml.txt1
-rw-r--r--test/expect/castxml1.c++98.Class-bases.xml.txt57
-rw-r--r--test/expect/castxml1.c++98.Class-template-bases.xml.txt44
-rw-r--r--test/expect/castxml1.c++98.Function-rvalue-reference.stderr.txt1
-rw-r--r--test/expect/castxml1.c++98.Method-rvalue-reference.stderr.txt1
-rw-r--r--test/expect/castxml1.c++98.RValueReferenceType.stderr.txt1
-rw-r--r--test/expect/castxml1.c++98.TypeAlias.stderr.txt1
-rw-r--r--test/expect/castxml1.c++98.TypeAliasTemplate.stderr.txt1
-rw-r--r--test/expect/castxml1.c.FunctionNoProto.xml.txt7
-rw-r--r--test/expect/castxml1.c.FundamentalType.xml.txt7
-rw-r--r--test/expect/castxml1.c.GNU-float128-nostart.xml.txt5
-rw-r--r--test/expect/castxml1.c.GNU-float128.xml.txt9
-rw-r--r--test/expect/castxml1.c.GNU-va_arg_pack.xml.txt10
-rw-r--r--test/expect/castxml1.c.Typedef-called-class.xml.txt8
-rw-r--r--test/expect/castxml1.c.invalid.result.txt1
-rw-r--r--test/expect/castxml1.c.invalid.stderr.txt1
148 files changed, 2217 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3f4972f..6803dd6 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -53,8 +53,15 @@ macro(castxml_test_output_common prefix ext std test)
list(APPEND _castxml_expect ${prefix}.c.${test})
endif()
list(APPEND _castxml_expect ${prefix}.any.${test})
+
+ if ("${prefix}" MATCHES "^gccxml(.*)$")
+ set(flag --castxml-gccxml)
+ elseif ("${prefix}" MATCHES "^castxml1(.*)$")
+ set(flag --castxml-output=1)
+ endif()
+
set(command $<TARGET_FILE:castxml>
- --castxml-gccxml
+ ${flag}
${_castxml_start}
-std=${std}
${CMAKE_CURRENT_LIST_DIR}/input/${_castxml_input}.${ext}
@@ -74,74 +81,92 @@ endmacro()
macro(castxml_test_output_c89 test)
castxml_test_output_common(gccxml c c89 ${test})
+ castxml_test_output_common(castxml1 c c89 ${test})
endmacro()
macro(castxml_test_output_c99 test)
castxml_test_output_common(gccxml c c99 ${test})
+ castxml_test_output_common(castxml1 c c99 ${test})
endmacro()
macro(castxml_test_output_c11 test)
castxml_test_output_common(gccxml c c11 ${test})
+ castxml_test_output_common(castxml1 c c11 ${test})
endmacro()
macro(castxml_test_output_gnu89 test)
castxml_test_output_common(gccxml c gnu89 ${test})
+ castxml_test_output_common(castxml1 c gnu89 ${test})
endmacro()
macro(castxml_test_output_gnu99 test)
castxml_test_output_common(gccxml c gnu99 ${test})
+ castxml_test_output_common(castxml1 c gnu99 ${test})
endmacro()
macro(castxml_test_output_gnu11 test)
castxml_test_output_common(gccxml c gnu11 ${test})
+ castxml_test_output_common(castxml1 c gnu11 ${test})
endmacro()
macro(castxml_test_output_cxx98 test)
castxml_test_output_common(gccxml cxx c++98 ${test})
+ castxml_test_output_common(castxml1 cxx c++98 ${test})
endmacro()
macro(castxml_test_output_gnuxx98 test)
castxml_test_output_common(gccxml cxx gnu++98 ${test})
+ castxml_test_output_common(castxml1 cxx gnu++98 ${test})
endmacro()
macro(castxml_test_output_cxx11 test)
castxml_test_output_common(gccxml cxx c++11 ${test})
+ castxml_test_output_common(castxml1 cxx c++11 ${test})
endmacro()
macro(castxml_test_output_gnuxx11 test)
castxml_test_output_common(gccxml cxx gnu++11 ${test})
+ castxml_test_output_common(castxml1 cxx gnu++11 ${test})
endmacro()
macro(castxml_test_output_cxx14 test)
castxml_test_output_common(gccxml cxx c++14 ${test})
+ castxml_test_output_common(castxml1 cxx c++14 ${test})
endmacro()
macro(castxml_test_output_gnuxx14 test)
castxml_test_output_common(gccxml cxx gnu++14 ${test})
+ castxml_test_output_common(castxml1 cxx gnu++14 ${test})
endmacro()
macro(castxml_test_output_broken_cxx98 test)
castxml_test_output_common(gccxml.broken cxx c++98 ${test})
+ castxml_test_output_common(castxml1.broken cxx c++98 ${test})
endmacro()
macro(castxml_test_output_broken_gnuxx98 test)
castxml_test_output_common(gccxml.broken cxx gnu++98 ${test})
+ castxml_test_output_common(castxml1.broken cxx gnu++98 ${test})
endmacro()
macro(castxml_test_output_broken_cxx11 test)
castxml_test_output_common(gccxml.broken cxx c++11 ${test})
+ castxml_test_output_common(castxml1.broken cxx c++11 ${test})
endmacro()
macro(castxml_test_output_broken_gnuxx11 test)
castxml_test_output_common(gccxml.broken cxx gnu++11 ${test})
+ castxml_test_output_common(castxml1.broken cxx gnu++11 ${test})
endmacro()
macro(castxml_test_output_broken_cxx14 test)
castxml_test_output_common(gccxml.broken cxx c++14 ${test})
+ castxml_test_output_common(castxml1.broken cxx c++14 ${test})
endmacro()
macro(castxml_test_output_broken_gnuxx14 test)
castxml_test_output_common(gccxml.broken cxx gnu++14 ${test})
+ castxml_test_output_common(castxml1.broken cxx gnu++14 ${test})
endmacro()
macro(castxml_test_output_c test)
diff --git a/test/expect/castxml1.any.ArrayType-incomplete.xml.txt b/test/expect/castxml1.any.ArrayType-incomplete.xml.txt
new file mode 100644
index 0000000..73f2b2d
--- /dev/null
+++ b/test/expect/castxml1.any.ArrayType-incomplete.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <ArrayType id="_2" min="0" max="" type="_4"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/ArrayType-incomplete.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.ArrayType.xml.txt b/test/expect/castxml1.any.ArrayType.xml.txt
new file mode 100644
index 0000000..e37e73c
--- /dev/null
+++ b/test/expect/castxml1.any.ArrayType.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <ArrayType id="_2" min="0" max="1" type="_4"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/ArrayType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.CXXLiteral.xml.txt b/test/expect/castxml1.any.CXXLiteral.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.CXXLiteral.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-abstract.xml.txt b/test/expect/castxml1.any.Class-abstract.xml.txt
new file mode 100644
index 0000000..d1774ce
--- /dev/null
+++ b/test/expect/castxml1.any.Class-abstract.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" abstract="1" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_9" context="_1" access="private" location="f1:3" file="f1" line="3" virtual="1" pure_virtual="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:3" file="f1" line="3"/>
+ </Method>
+ <Converter id="_4" returns="_9" context="_1" access="private" location="f1:4" file="f1" line="4" virtual="1" pure_virtual="1" mangled="[^"]+"/>
+ <Destructor id="_5" name="start" context="_1" access="private" location="f1:5" file="f1" line="5" virtual="1" pure_virtual="1"/>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_11" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Constructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_8" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_11" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1"/>
+ <ReferenceType id="_11" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-abstract.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-annotate.xml.txt b/test/expect/castxml1.any.Class-annotate.xml.txt
new file mode 100644
index 0000000..24ac0ea
--- /dev/null
+++ b/test/expect/castxml1.any.Class-annotate.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+" attributes="annotate\(an annotation\)"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-base-offset.xml.txt b/test/expect/castxml1.any.Class-base-offset.xml.txt
new file mode 100644
index 0000000..46a09a3
--- /dev/null
+++ b/test/expect/castxml1.any.Class-base-offset.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:13" file="f1" line="13" members="_3 _4 _5 _6" bases="_7 _8 _9" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="0"/>
+ <Base type="_8" access="public" virtual="0" offset="1"/>
+ <Base type="_9" access="public" virtual="0" offset="2"/>
+ </Class>
+.*
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-base-offset.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-base-typedef.xml.txt b/test/expect/castxml1.any.Class-base-typedef.xml.txt
new file mode 100644
index 0000000..b5f8e4d
--- /dev/null
+++ b/test/expect/castxml1.any.Class-base-typedef.xml.txt
@@ -0,0 +1,31 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:5" file="f1" line="5" members="_3 _4 _5 _6" bases="_7" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?>
+ <Argument type="_8" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_9" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_8" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Class id="_7" name="base" context="_2" location="f1:1" file="f1" line="1" members="_10 _11 _12 _13" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_8" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_9" type="_1"/>
+ <Constructor id="_10" name="base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_11" name="base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_14" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_12" name="=" returns="_15" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_14" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_13" name="base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_14" type="_7c"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <ReferenceType id="_15" type="_7"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-base-typedef.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-forward.xml.txt b/test/expect/castxml1.any.Class-forward.xml.txt
new file mode 100644
index 0000000..ed93735
--- /dev/null
+++ b/test/expect/castxml1.any.Class-forward.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6">
+ <Argument type="_7" location="f1:6" file="f1" line="6"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_8" context="_1" access="public" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_7" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:8" file="f1" line="8"/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-forward.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-friends.xml.txt b/test/expect/castxml1.any.Class-friends.xml.txt
new file mode 100644
index 0000000..0575887
--- /dev/null
+++ b/test/expect/castxml1.any.Class-friends.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:5" file="f1" line="5" members="_3 _4 _5 _6" befriending="_7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <Function id="_7" name="f" returns="_11" context="_2" location="f1:4" file="f1" line="4" mangled="[^"]+"/>
+ <Class id="_8" name="A" context="_2" location="f1:1" file="f1" line="1" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_11" name="void" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Class-friends.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-access-mutable.xml.txt b/test/expect/castxml1.any.Class-implicit-member-access-mutable.xml.txt
new file mode 100644
index 0000000..86c7f94
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-access-mutable.xml.txt
@@ -0,0 +1,24 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:12" file="f1" line="12" members="_3 _4" bases="_5" size="[0-9]+" align="[0-9]+">
+ <Base type="_5" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Destructor id="_3" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Class id="_5" name="base" context="_2" location="f1:1" file="f1" line="1" members="_6 _7 _8 _9 _10" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_6" name="base" context="_5" access="protected" location="f1:4" file="f1" line="4"/>
+ <Destructor id="_7" name="base" context="_5" access="protected" location="f1:5" file="f1" line="5"/>
+ <Constructor id="_8" name="base" context="_5" access="private" location="f1:8" file="f1" line="8">
+ <Argument type="_11" location="f1:8" file="f1" line="8"/>
+ </Constructor>
+ <OperatorMethod id="_9" name="=" returns="_12" context="_5" access="private" location="f1:9" file="f1" line="9" mangled="[^"]+">
+ <Argument type="_11" location="f1:9" file="f1" line="9"/>
+ </OperatorMethod>
+ <Field id="_10" name="data" type="_13" context="_5" access="private" location="f1:10" file="f1" line="10" offset="0" mutable="1"/>
+ <ReferenceType id="_11" type="_5c"/>
+ <CvQualifiedType id="_5c" type="_5" const="1"/>
+ <ReferenceType id="_12" type="_5"/>
+ <FundamentalType id="_13" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-access-mutable.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-access.xml.txt b/test/expect/castxml1.any.Class-implicit-member-access.xml.txt
new file mode 100644
index 0000000..a3ca787
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-access.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:11" file="f1" line="11" members="_3 _4" bases="_5" size="[0-9]+" align="[0-9]+">
+ <Base type="_5" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Destructor id="_3" name="start" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Class id="_5" name="base" context="_2" location="f1:1" file="f1" line="1" members="_6 _7 _8 _9" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_6" name="base" context="_5" access="protected" location="f1:4" file="f1" line="4"/>
+ <Destructor id="_7" name="base" context="_5" access="protected" location="f1:5" file="f1" line="5"/>
+ <Constructor id="_8" name="base" context="_5" access="private" location="f1:8" file="f1" line="8">
+ <Argument type="_10" location="f1:8" file="f1" line="8"/>
+ </Constructor>
+ <OperatorMethod id="_9" name="=" returns="_11" context="_5" access="private" location="f1:9" file="f1" line="9" mangled="[^"]+">
+ <Argument type="_10" location="f1:9" file="f1" line="9"/>
+ </OperatorMethod>
+ <ReferenceType id="_10" type="_5c"/>
+ <CvQualifiedType id="_5c" type="_5" const="1"/>
+ <ReferenceType id="_11" type="_5"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-access.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-array.xml.txt b/test/expect/castxml1.any.Class-implicit-member-array.xml.txt
new file mode 100644
index 0000000..dcf4139
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-array.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="data" type="_8" context="_1" access="private" location="f1:3" file="f1" line="3" offset="0"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ArrayType id="_8" min="0" max="1" type="_11"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <FundamentalType id="_11" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-array.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-bad-base.xml.txt b/test/expect/castxml1.any.Class-implicit-member-bad-base.xml.txt
new file mode 100644
index 0000000..e55cf63
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-bad-base.xml.txt
@@ -0,0 +1,26 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:9" file="f1" line="9" members="_3 _4 _5" bases="_6" size="[0-9]+" align="[0-9]+">
+ <Base type="_6" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:9" file="f1" line="9"/>
+ </Constructor>
+ <Destructor id="_5" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <Class id="_6" name="base&lt;const int&gt;" context="_2" location="f1:2" file="f1" line="2" members="_8 _9 _10 _11" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Field id="_8" name="data" type="_12c" context="_6" access="protected" location="f1:5" file="f1" line="5" offset="0"/>
+ <Constructor id="_9" name="base" context="_6" access="protected" location="f1:6" file="f1" line="6"/>
+ <Constructor id="_10" name="base" context="_6" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?>
+ <Argument type="_13" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <Destructor id="_11" name="base" context="_6" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_12" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_12c" type="_12" const="1"/>
+ <ReferenceType id="_13" type="_6c"/>
+ <CvQualifiedType id="_6c" type="_6" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-bad-base.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-const-aggregate.xml.txt b/test/expect/castxml1.any.Class-implicit-member-const-aggregate.xml.txt
new file mode 100644
index 0000000..64b1748
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-const-aggregate.xml.txt
@@ -0,0 +1,15 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Struct id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="data" type="_6c" context="_1" access="public" location="f1:3" file="f1" line="3" offset="0"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <Destructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_6c" type="_6" const="1"/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-const-aggregate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-const.xml.txt b/test/expect/castxml1.any.Class-implicit-member-const.xml.txt
new file mode 100644
index 0000000..6cf9176
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-const.xml.txt
@@ -0,0 +1,16 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="data" type="_7c" context="_1" access="private" location="f1:3" file="f1" line="3" offset="0"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_8" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_7" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <ReferenceType id="_8" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-const.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-member-reference.xml.txt b/test/expect/castxml1.any.Class-implicit-member-reference.xml.txt
new file mode 100644
index 0000000..82e939d
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-member-reference.xml.txt
@@ -0,0 +1,16 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="ref" type="_7" context="_1" access="private" location="f1:3" file="f1" line="3" offset="0"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_8" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_9"/>
+ <ReferenceType id="_8" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Class-implicit-member-reference.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-implicit-members.xml.txt b/test/expect/castxml1.any.Class-implicit-members.xml.txt
new file mode 100644
index 0000000..21b01b0
--- /dev/null
+++ b/test/expect/castxml1.any.Class-implicit-members.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_1" context="_1" access="private" location="f1:3" file="f1" line="3" inline="1" mangled="[^"]+">
+ <Argument name="x" type="_8" location="f1:3" file="f1" line="3"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_8" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_9" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_8" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_8" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_9" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-implicit-members.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-incomplete-twice.xml.txt b/test/expect/castxml1.any.Class-incomplete-twice.xml.txt
new file mode 100644
index 0000000..9ed4dee
--- /dev/null
+++ b/test/expect/castxml1.any.Class-incomplete-twice.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Class id="_3" name="A" context="_1" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-incomplete-twice.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-incomplete.xml.txt b/test/expect/castxml1.any.Class-incomplete.xml.txt
new file mode 100644
index 0000000..3fc63bb
--- /dev/null
+++ b/test/expect/castxml1.any.Class-incomplete.xml.txt
@@ -0,0 +1,6 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-incomplete.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-member-template-access.xml.txt b/test/expect/castxml1.any.Class-member-template-access.xml.txt
new file mode 100644
index 0000000..142f073
--- /dev/null
+++ b/test/expect/castxml1.any.Class-member-template-access.xml.txt
@@ -0,0 +1,31 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7 _8 _9" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_3" name="member&lt;char&gt;" context="_1" access="private" location="f1:4" file="f1" line="4" incomplete="1"/>
+ <Class id="_4" name="member&lt;int&gt;" context="_1" access="private" location="f1:11" file="f1" line="11" members="_10 _11 _12 _13" size="[0-9]+" align="[0-9]+"/>
+ <Typedef id="_5" name="member_char" type="_3" context="_1" access="public" location="f1:9" file="f1" line="9"/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_14" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_8" name="=" returns="_15" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_14" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_9" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_10" name="member" context="_4" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_11" name="member" context="_4" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?>
+ <Argument type="_16" location="f1:11" file="f1" line="11"/>
+ </Constructor>
+ <OperatorMethod id="_12" name="=" returns="_17" context="_4" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_16" location="f1:11" file="f1" line="11"/>
+ </OperatorMethod>
+ <Destructor id="_13" name="member" context="_4" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_14" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_15" type="_1"/>
+ <ReferenceType id="_16" type="_4c"/>
+ <CvQualifiedType id="_4c" type="_4" const="1"/>
+ <ReferenceType id="_17" type="_4"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-member-template-access.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-member-template.xml.txt b/test/expect/castxml1.any.Class-member-template.xml.txt
new file mode 100644
index 0000000..1d36397
--- /dev/null
+++ b/test/expect/castxml1.any.Class-member-template.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:4" file="f1" line="4" inline="1" mangled="[^"]+">
+ <Argument name="v" type="_8" location="f1:4" file="f1" line="4"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-member-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-partial-template-member-Typedef.xml.txt b/test/expect/castxml1.any.Class-partial-template-member-Typedef.xml.txt
new file mode 100644
index 0000000..cb786c6
--- /dev/null
+++ b/test/expect/castxml1.any.Class-partial-template-member-Typedef.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int &amp;&gt;" context="_2" location="f1:11" file="f1" line="11" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Typedef id="_3" name="Int" type="_9" context="_1" access="private" location="f1:6" file="f1" line="6"/>
+ <Method id="_4" name="method" returns="_9" context="_1" access="public" location="f1:9" file="f1" line="9" mangled="[^"]+">
+ <Argument type="_3" location="f1:9" file="f1" line="9"/>
+ </Method>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:11" file="f1" line="11"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_11" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:11" file="f1" line="11"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-partial-template-member-Typedef.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-Method-Argument-const.xml.txt b/test/expect/castxml1.any.Class-template-Method-Argument-const.xml.txt
new file mode 100644
index 0000000..7819a51
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-Method-Argument-const.xml.txt
@@ -0,0 +1,24 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;const int&gt;" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:4" file="f1" line="4" mangled="[^"]+">
+ <Argument type="_9" location="f1:4" file="f1" line="4"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:6" file="f1" line="6"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_11" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:6" file="f1" line="6"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="void" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_12c"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <CvQualifiedType id="_12c" type="_12" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <FundamentalType id="_12" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Class-template-Method-Argument-const.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-Method-Argument-default.xml.txt b/test/expect/castxml1.any.Class-template-Method-Argument-default.xml.txt
new file mode 100644
index 0000000..864bbef
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-Method-Argument-default.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:4" file="f1" line="4" mangled="[^"]+">
+ <Argument type="_8" location="f1:4" file="f1" line="4" default="123"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-Method-Argument-default.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-Method-return-const.xml.txt b/test/expect/castxml1.any.Class-template-Method-return-const.xml.txt
new file mode 100644
index 0000000..85dcfef
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-Method-return-const.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;const int&gt;" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8c" context="_1" access="private" location="f1:4" file="f1" line="4" mangled="[^"]+"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_8c" type="_8" const="1"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-Method-return-const.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-constructor-template.xml.txt b/test/expect/castxml1.any.Class-template-constructor-template.xml.txt
new file mode 100644
index 0000000..4423318
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-constructor-template.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:5" file="f1" line="5">
+ <Argument type="_7" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:7" file="f1" line="7">
+ <Argument type="_8" location="f1:7" file="f1" line="7"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_9" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1c"/>
+ <ReferenceType id="_9" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-constructor-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-friends.xml.txt b/test/expect/castxml1.any.Class-template-friends.xml.txt
new file mode 100644
index 0000000..f1a339a
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-friends.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:13" file="f1" line="13" members="_3 _4 _5 _6" befriending="_7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:13" file="f1" line="13" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:13" file="f1" line="13" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:13" file="f1" line="13"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:13" file="f1" line="13" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:13" file="f1" line="13"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:13" file="f1" line="13" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <Function id="_7" name="f" returns="_11" context="_2" location="f1:9" file="f1" line="9" mangled="[^"]+">
+ <Argument type="_11" location="f1:4" file="f1" line="4"/>
+ </Function>
+ <Class id="_8" name="A&lt;int&gt;" context="_2" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <FundamentalType id="_11" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Class-template-friends.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-member-Typedef-const.xml.txt b/test/expect/castxml1.any.Class-template-member-Typedef-const.xml.txt
new file mode 100644
index 0000000..2ee0258
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-member-Typedef-const.xml.txt
@@ -0,0 +1,23 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;const int&gt;" context="_2" location="f1:9" file="f1" line="9" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Typedef id="_3" name="IntConst" type="_9c" context="_1" access="private" location="f1:4" file="f1" line="4"/>
+ <Method id="_4" name="method" returns="_9c" context="_1" access="public" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_3" location="f1:7" file="f1" line="7"/>
+ </Method>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:9" file="f1" line="9"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_11" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:9" file="f1" line="9"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-member-Typedef-const.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-member-Typedef.xml.txt b/test/expect/castxml1.any.Class-template-member-Typedef.xml.txt
new file mode 100644
index 0000000..1fb29c0
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-member-Typedef.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:9" file="f1" line="9" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Typedef id="_3" name="Int" type="_9" context="_1" access="private" location="f1:4" file="f1" line="4"/>
+ <Method id="_4" name="method" returns="_9" context="_1" access="public" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_3" location="f1:7" file="f1" line="7"/>
+ </Method>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:9" file="f1" line="9"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_11" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:9" file="f1" line="9"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:9" file="f1" line="9" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-member-Typedef.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-member-nontemplate-Typedef.xml.txt b/test/expect/castxml1.any.Class-template-member-nontemplate-Typedef.xml.txt
new file mode 100644
index 0000000..5a53d7c
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-member-nontemplate-Typedef.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:10" file="f1" line="10"/>
+ <Typedef id="_2" name="type" type="_4" context="_5" access="public" location="f1:7" file="f1" line="7"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <Struct id="_5" name="B" context="_6" access="public" location="f1:4" file="f1" line="4" size="[0-9]+" align="[0-9]+"/>
+ <Struct id="_6" name="A&lt;int&gt;" context="_3" location="f1:2" file="f1" line="2" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Class-template-member-nontemplate-Typedef.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-member-template.xml.txt b/test/expect/castxml1.any.Class-template-member-template.xml.txt
new file mode 100644
index 0000000..12740fd
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-member-template.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:2" file="f1" line="2" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:5" file="f1" line="5" inline="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:5" file="f1" line="5"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_11" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_9" name="char" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-member-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template-recurse.xml.txt b/test/expect/castxml1.any.Class-template-recurse.xml.txt
new file mode 100644
index 0000000..3158042
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template-recurse.xml.txt
@@ -0,0 +1,18 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Variable id="_1" name="start" type="_2" init="" context="_3" location="f1:20" file="f1" line="20" mangled="[^"]+"/>
+ <Struct id="_2" name="C&lt;void&gt;" context="_3" location="f1:11" file="f1" line="11" members="_4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_4" name="C" context="_2" access="public" location="f1:13" file="f1" line="13" inline="1"/>
+ <Constructor id="_5" name="C" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?>
+ <Argument type="_8" location="f1:11" file="f1" line="11"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_9" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_8" location="f1:11" file="f1" line="11"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="C" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_8" type="_2c"/>
+ <CvQualifiedType id="_2c" type="_2" const="1"/>
+ <ReferenceType id="_9" type="_2"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template-recurse.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class-template.xml.txt b/test/expect/castxml1.any.Class-template.xml.txt
new file mode 100644
index 0000000..617a12b
--- /dev/null
+++ b/test/expect/castxml1.any.Class-template.xml.txt
@@ -0,0 +1,30 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;char&gt;" context="_4" location="f1:10" file="f1" line="10" incomplete="1"/>
+ <Class id="_2" name="start&lt;int&gt;" context="_4" location="f1:11" file="f1" line="11" members="_5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Struct id="_3" name="start&lt;int &amp;&gt;" context="_4" location="f1:12" file="f1" line="12" members="_9 _10 _11 _12" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_5" name="start" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?>
+ <Argument type="_13" location="f1:11" file="f1" line="11"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_14" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_13" location="f1:11" file="f1" line="11"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_2" access="public" location="f1:11" file="f1" line="11" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_9" name="start" context="_3" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_10" name="start" context="_3" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?>
+ <Argument type="_15" location="f1:12" file="f1" line="12"/>
+ </Constructor>
+ <OperatorMethod id="_11" name="=" returns="_16" context="_3" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_15" location="f1:12" file="f1" line="12"/>
+ </OperatorMethod>
+ <Destructor id="_12" name="start" context="_3" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_13" type="_2c"/>
+ <CvQualifiedType id="_2c" type="_2" const="1"/>
+ <ReferenceType id="_14" type="_2"/>
+ <ReferenceType id="_15" type="_3c"/>
+ <CvQualifiedType id="_3c" type="_3" const="1"/>
+ <ReferenceType id="_16" type="_3"/>
+ <Namespace id="_4" name="::"/>
+ <File id="f1" name=".*/test/input/Class-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Class.xml.txt b/test/expect/castxml1.any.Class.xml.txt
new file mode 100644
index 0000000..6b270fd
--- /dev/null
+++ b/test/expect/castxml1.any.Class.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Constructor-annotate.xml.txt b/test/expect/castxml1.any.Constructor-annotate.xml.txt
new file mode 100644
index 0000000..e4f9b54
--- /dev/null
+++ b/test/expect/castxml1.any.Constructor-annotate.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="private" location="f1:3" file="f1" line="3" attributes="annotate\(an annotation\)"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Constructor-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Constructor.xml.txt b/test/expect/castxml1.any.Constructor.xml.txt
new file mode 100644
index 0000000..23460b4
--- /dev/null
+++ b/test/expect/castxml1.any.Constructor.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="private" location="f1:3" file="f1" line="3"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Constructor.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Converter-annotate.xml.txt b/test/expect/castxml1.any.Converter-annotate.xml.txt
new file mode 100644
index 0000000..37e05ea
--- /dev/null
+++ b/test/expect/castxml1.any.Converter-annotate.xml.txt
@@ -0,0 +1,19 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Converter id="_3" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="annotate\(an annotation\)"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Converter-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Converter.xml.txt b/test/expect/castxml1.any.Converter.xml.txt
new file mode 100644
index 0000000..98bdda8
--- /dev/null
+++ b/test/expect/castxml1.any.Converter.xml.txt
@@ -0,0 +1,19 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Converter id="_3" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Converter.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.CvQualifiedType.xml.txt b/test/expect/castxml1.any.CvQualifiedType.xml.txt
new file mode 100644
index 0000000..7294fa3
--- /dev/null
+++ b/test/expect/castxml1.any.CvQualifiedType.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2c" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_2c" type="_2" const="1"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/CvQualifiedType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Destructor-annotate.xml.txt b/test/expect/castxml1.any.Destructor-annotate.xml.txt
new file mode 100644
index 0000000..b21a772
--- /dev/null
+++ b/test/expect/castxml1.any.Destructor-annotate.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Destructor id="_3" name="start" context="_1" access="private" location="f1:3" file="f1" line="3" attributes="annotate\(an annotation\)"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Destructor-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Destructor.xml.txt b/test/expect/castxml1.any.Destructor.xml.txt
new file mode 100644
index 0000000..5298fb4
--- /dev/null
+++ b/test/expect/castxml1.any.Destructor.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Destructor id="_3" name="start" context="_1" access="private" location="f1:3" file="f1" line="3"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <ReferenceType id="_7" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_8" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Destructor.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Enumeration-annotate.xml.txt b/test/expect/castxml1.any.Enumeration-annotate.xml.txt
new file mode 100644
index 0000000..0040743
--- /dev/null
+++ b/test/expect/castxml1.any.Enumeration-annotate.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" attributes="annotate\(an annotation\)">
+ <EnumValue name="ev0" init="0" attributes="annotate\(an annotation\)"/>
+ </Enumeration>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Enumeration-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Enumeration-anonymous.xml.txt b/test/expect/castxml1.any.Enumeration-anonymous.xml.txt
new file mode 100644
index 0000000..f0de02d
--- /dev/null
+++ b/test/expect/castxml1.any.Enumeration-anonymous.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Enumeration id="_3" name="" context="_1" location="f1:2" file="f1" line="2">
+ <EnumValue name="ev0" init="0"/>
+ <EnumValue name="ev1" init="1"/>
+ </Enumeration>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Enumeration-anonymous.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Enumeration.xml.txt b/test/expect/castxml1.any.Enumeration.xml.txt
new file mode 100644
index 0000000..664a6c8
--- /dev/null
+++ b/test/expect/castxml1.any.Enumeration.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Enumeration id="_1" name="start" context="_2" location="f1:1" file="f1" line="1">
+ <EnumValue name="ev0" init="0"/>
+ <EnumValue name="ev2" init="2"/>
+ </Enumeration>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Enumeration.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Field-annotate.xml.txt b/test/expect/castxml1.any.Field-annotate.xml.txt
new file mode 100644
index 0000000..f8fd8c2
--- /dev/null
+++ b/test/expect/castxml1.any.Field-annotate.xml.txt
@@ -0,0 +1,19 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="field" type="_8" context="_1" access="private" location="f1:3" file="f1" line="3" offset="0" attributes="annotate\(an annotation\)"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Field-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Field.xml.txt b/test/expect/castxml1.any.Field.xml.txt
new file mode 100644
index 0000000..0bf7a8a
--- /dev/null
+++ b/test/expect/castxml1.any.Field.xml.txt
@@ -0,0 +1,22 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7 _8 _9" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="field" type="_10" context="_1" access="private" location="f1:3" file="f1" line="3" offset="0"/>
+ <Field id="_4" name="bit_field" type="_11" bits="2" context="_1" access="private" location="f1:4" file="f1" line="4" offset="32"/>
+ <Field id="_5" name="mutable_field" type="_10" context="_1" access="private" location="f1:5" file="f1" line="5" offset="64" mutable="1"/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_12" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_13" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_12" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Constructor id="_8" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Destructor id="_9" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_10" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_11" name="unsigned int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_12" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_13" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Field.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-Argument-Annotate.xml.txt b/test/expect/castxml1.any.Function-Argument-Annotate.xml.txt
new file mode 100644
index 0000000..52ad224
--- /dev/null
+++ b/test/expect/castxml1.any.Function-Argument-Annotate.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1" attributes="annotate\(an annotation\)"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function-Argument-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-Argument-decay.xml.txt b/test/expect/castxml1.any.Function-Argument-decay.xml.txt
new file mode 100644
index 0000000..9d1d6f6
--- /dev/null
+++ b/test/expect/castxml1.any.Function-Argument-decay.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ <Argument type="_5" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_4" type="_6"/>
+ <PointerType id="_5" type="_7"/>
+ <Namespace id="_3" name="::"/>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FunctionType id="_7" returns="_6">
+ <Argument type="_6"/>
+ </FunctionType>
+ <File id="f1" name=".*/test/input/Function-Argument-decay.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-Argument-default-cast.xml.txt b/test/expect/castxml1.any.Function-Argument-default-cast.xml.txt
new file mode 100644
index 0000000..e2b7051
--- /dev/null
+++ b/test/expect/castxml1.any.Function-Argument-default-cast.xml.txt
@@ -0,0 +1,48 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5 _6 _7 _8"/>
+ <Struct id="_3" name="Base" context="_1" location="f1:2" file="f1" line="2" members="_9 _10 _11 _12" size="[0-9]+" align="[0-9]+"/>
+ <Struct id="_4" name="Derived" context="_1" location="f1:7" file="f1" line="7" members="_13 _14 _15 _16" bases="_3" size="[0-9]+" align="[0-9]+">
+ <Base type="_3" access="public" virtual="0" offset="0"/>
+ </Struct>
+ <Function id="_5" name="b" returns="_17" context="_1" location="f1:10" file="f1" line="10" mangled="[^"]+"/>
+ <Function id="_6" name="bc" returns="_18" context="_1" location="f1:11" file="f1" line="11" mangled="[^"]+"/>
+ <Typedef id="_7" name="Int" type="_19" context="_1" location="f1:12" file="f1" line="12"/>
+ <Function id="_8" name="f" returns="_20" context="_1" location="f1:13" file="f1" line="13" mangled="[^"]+">
+ <Argument type="_7" location="f1:13" file="f1" line="13" default="\(int\)0"/>
+ <Argument type="_17" location="f1:13" file="f1" line="13" default="\(start::Base \*\)0"/>
+ <Argument type="_17" location="f1:13" file="f1" line="13" default="static_cast&lt;start::Base \*&gt;\(0\)"/>
+ <Argument type="_17" location="f1:14" file="f1" line="14" default="reinterpret_cast&lt;start::Base \*&gt;\(0\)"/>
+ <Argument type="_17" location="f1:14" file="f1" line="14" default="const_cast&lt;start::Base \*&gt;\(start::bc\(\)\)"/>
+ <Argument type="_21" location="f1:15" file="f1" line="15" default="dynamic_cast&lt;start::Derived \*&gt;\(start::b\(\)\)"/>
+ </Function>
+ <Constructor id="_9" name="Base" context="_3" access="public" location="f1:4" file="f1" line="4"/>
+ <Destructor id="_10" name="Base" context="_3" access="public" location="f1:5" file="f1" line="5" virtual="1"/>
+ <OperatorMethod id="_11" name="=" returns="_22" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_23" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Constructor id="_12" name="Base" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?>
+ <Argument type="_23" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <OperatorMethod id="_13" name="=" returns="_24" context="_4" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_25" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_14" name="Derived" context="_4" access="public" location="f1:7" file="f1" line="7" virtual="1" inline="1" artificial="1"( throw="")? overrides="_10"/>
+ <Constructor id="_15" name="Derived" context="_4" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_16" name="Derived" context="_4" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")?>
+ <Argument type="_25" location="f1:7" file="f1" line="7"/>
+ </Constructor>
+ <PointerType id="_17" type="_3"/>
+ <PointerType id="_18" type="_3c"/>
+ <CvQualifiedType id="_3c" type="_3" const="1"/>
+ <FundamentalType id="_19" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_20" name="void" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_21" type="_4"/>
+ <ReferenceType id="_22" type="_3"/>
+ <ReferenceType id="_23" type="_3c"/>
+ <ReferenceType id="_24" type="_4"/>
+ <ReferenceType id="_25" type="_4c"/>
+ <CvQualifiedType id="_4c" type="_4" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Function-Argument-default-cast.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt b/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt
new file mode 100644
index 0000000..b2625fd
--- /dev/null
+++ b/test/expect/castxml1.any.Function-Argument-default-ns.xml.txt
@@ -0,0 +1,17 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
+ <Variable id="_3" name="C" type="_6c" init="0" context="_1" location="f1:2" file="f1" line="2" static="1" mangled="[^"]+"/>
+ <Enumeration id="_4" name="" context="_1" location="f1:3" file="f1" line="3">
+ <EnumValue name="E" init="0"/>
+ </Enumeration>
+ <Function id="_5" name="f" returns="_7" context="_1" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_6" location="f1:7" file="f1" line="7" default="start::C"/>
+ <Argument type="_6" location="f1:7" file="f1" line="7" default="start::E"/>
+ </Function>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_6c" type="_6" const="1"/>
+ <FundamentalType id="_7" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Function-Argument-default-ns.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-Argument-default.xml.txt b/test/expect/castxml1.any.Function-Argument-default.xml.txt
new file mode 100644
index 0000000..98d8079
--- /dev/null
+++ b/test/expect/castxml1.any.Function-Argument-default.xml.txt
@@ -0,0 +1,14 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1" default="123"/>
+ <Argument type="_5" location="f1:1" file="f1" line="1" default="&quot;abc&quot;"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_5" type="_6c"/>
+ <CvQualifiedType id="_6c" type="_6" const="1"/>
+ <Namespace id="_3" name="::"/>
+ <FundamentalType id="_6" name="char" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Function-Argument-default.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-annotate.xml.txt b/test/expect/castxml1.any.Function-annotate.xml.txt
new file mode 100644
index 0000000..1bd3eef
--- /dev/null
+++ b/test/expect/castxml1.any.Function-annotate.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+" attributes="annotate\(an annotation\)">
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-calling-convention-ms-annotate.xml.txt b/test/expect/castxml1.any.Function-calling-convention-ms-annotate.xml.txt
new file mode 100644
index 0000000..7512e13
--- /dev/null
+++ b/test/expect/castxml1.any.Function-calling-convention-ms-annotate.xml.txt
@@ -0,0 +1,26 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_5" context="_6" location="f1:1" file="f1" line="1" mangled="[^"]+" attributes="annotate\(an annotation\)">
+ <Argument type="_7" location="f1:2" file="f1" line="2"/>
+ </Function>
+ <Function id="_2" name="start" returns="_5" context="_6" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="__stdcall__ annotate\(an annotation\)">
+ <Argument type="_8" location="f1:4" file="f1" line="4"/>
+ </Function>
+ <Function id="_3" name="start" returns="_5" context="_6" location="f1:5" file="f1" line="5" mangled="[^"]+" attributes="__fastcall__ annotate\(an annotation\)">
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </Function>
+ <Function id="_4" name="start" returns="_5" context="_6" location="f1:7" file="f1" line="7" mangled="[^"]+" attributes="__thiscall__ annotate\(an annotation\)">
+ <Argument type="_10" location="f1:8" file="f1" line="8"/>
+ </Function>
+ <FundamentalType id="_5" name="void" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_7" type="_11"/>
+ <PointerType id="_8" type="_12"/>
+ <PointerType id="_9" type="_13"/>
+ <PointerType id="_10" type="_14"/>
+ <Namespace id="_6" name="::"/>
+ <FunctionType id="_11" returns="_5"/>
+ <FunctionType id="_12" returns="_5" attributes="__stdcall__"/>
+ <FunctionType id="_13" returns="_5" attributes="__fastcall__"/>
+ <FunctionType id="_14" returns="_5" attributes="__thiscall__"/>
+ <File id="f1" name=".*/test/input/Function-calling-convention-ms-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-calling-convention-ms.xml.txt b/test/expect/castxml1.any.Function-calling-convention-ms.xml.txt
new file mode 100644
index 0000000..450b3da
--- /dev/null
+++ b/test/expect/castxml1.any.Function-calling-convention-ms.xml.txt
@@ -0,0 +1,26 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_5" context="_6" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_7" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <Function id="_2" name="start" returns="_5" context="_6" location="f1:2" file="f1" line="2" mangled="[^"]+" attributes="__stdcall__">
+ <Argument type="_8" location="f1:2" file="f1" line="2"/>
+ </Function>
+ <Function id="_3" name="start" returns="_5" context="_6" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="__fastcall__">
+ <Argument type="_9" location="f1:3" file="f1" line="3"/>
+ </Function>
+ <Function id="_4" name="start" returns="_5" context="_6" location="f1:4" file="f1" line="4" mangled="[^"]+" attributes="__thiscall__">
+ <Argument type="_10" location="f1:4" file="f1" line="4"/>
+ </Function>
+ <FundamentalType id="_5" name="void" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_7" type="_11"/>
+ <PointerType id="_8" type="_12"/>
+ <PointerType id="_9" type="_13"/>
+ <PointerType id="_10" type="_14"/>
+ <Namespace id="_6" name="::"/>
+ <FunctionType id="_11" returns="_5"/>
+ <FunctionType id="_12" returns="_5" attributes="__stdcall__"/>
+ <FunctionType id="_13" returns="_5" attributes="__fastcall__"/>
+ <FunctionType id="_14" returns="_5" attributes="__thiscall__"/>
+ <File id="f1" name=".*/test/input/Function-calling-convention-ms.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-rvalue-reference.xml.txt b/test/expect/castxml1.any.Function-rvalue-reference.xml.txt
new file mode 100644
index 0000000..f8067ce
--- /dev/null
+++ b/test/expect/castxml1.any.Function-rvalue-reference.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_2" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function-rvalue-reference.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-template.xml.txt b/test/expect/castxml1.any.Function-template.xml.txt
new file mode 100644
index 0000000..3c8b78c
--- /dev/null
+++ b/test/expect/castxml1.any.Function-template.xml.txt
@@ -0,0 +1,13 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_3" context="_4" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_3" location="f1:2" file="f1" line="2"/>
+ </Function>
+ <Function id="_2" name="start" returns="_5" context="_4" location="f1:2" file="f1" line="2" mangled="[^"]+">
+ <Argument type="_5" location="f1:2" file="f1" line="2"/>
+ </Function>
+ <FundamentalType id="_3" name="char" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_4" name="::"/>
+ <File id="f1" name=".*/test/input/Function-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-throw.xml.txt b/test/expect/castxml1.any.Function-throw.xml.txt
new file mode 100644
index 0000000..661916f
--- /dev/null
+++ b/test/expect/castxml1.any.Function-throw.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" throw="_4 _5" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_5" name="char" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function-throw.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function-variadic.xml.txt b/test/expect/castxml1.any.Function-variadic.xml.txt
new file mode 100644
index 0000000..3d4c7eb
--- /dev/null
+++ b/test/expect/castxml1.any.Function-variadic.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ <Ellipsis/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function-variadic.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Function.xml.txt b/test/expect/castxml1.any.Function.xml.txt
new file mode 100644
index 0000000..c75871e
--- /dev/null
+++ b/test/expect/castxml1.any.Function.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_4" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Function.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.FunctionType-variadic.xml.txt b/test/expect/castxml1.any.FunctionType-variadic.xml.txt
new file mode 100644
index 0000000..80a9371
--- /dev/null
+++ b/test/expect/castxml1.any.FunctionType-variadic.xml.txt
@@ -0,0 +1,12 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FunctionType id="_2" returns="_4">
+ <Argument type="_5"/>
+ <Ellipsis/>
+ </FunctionType>
+ <FundamentalType id="_4" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/FunctionType-variadic.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.FunctionType.xml.txt b/test/expect/castxml1.any.FunctionType.xml.txt
new file mode 100644
index 0000000..144e7bf
--- /dev/null
+++ b/test/expect/castxml1.any.FunctionType.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FunctionType id="_2" returns="_4">
+ <Argument type="_5"/>
+ </FunctionType>
+ <FundamentalType id="_4" name="void" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/FunctionType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.FundamentalType.xml.txt b/test/expect/castxml1.any.FundamentalType.xml.txt
new file mode 100644
index 0000000..2b13ffc
--- /dev/null
+++ b/test/expect/castxml1.any.FundamentalType.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/FundamentalType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.FundamentalTypes.xml.txt b/test/expect/castxml1.any.FundamentalTypes.xml.txt
new file mode 100644
index 0000000..31c8fdd
--- /dev/null
+++ b/test/expect/castxml1.any.FundamentalTypes.xml.txt
@@ -0,0 +1,32 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15"/>
+ <Typedef id="_3" name="t_Char" type="_16" context="_1" location="f1:2" file="f1" line="2"/>
+ <Typedef id="_4" name="t_SChar" type="_17" context="_1" location="f1:3" file="f1" line="3"/>
+ <Typedef id="_5" name="t_UChar" type="_18" context="_1" location="f1:4" file="f1" line="4"/>
+ <Typedef id="_6" name="t_Short" type="_19" context="_1" location="f1:5" file="f1" line="5"/>
+ <Typedef id="_7" name="t_UShort" type="_20" context="_1" location="f1:6" file="f1" line="6"/>
+ <Typedef id="_8" name="t_Int" type="_21" context="_1" location="f1:7" file="f1" line="7"/>
+ <Typedef id="_9" name="t_UInt" type="_22" context="_1" location="f1:8" file="f1" line="8"/>
+ <Typedef id="_10" name="t_Long" type="_23" context="_1" location="f1:9" file="f1" line="9"/>
+ <Typedef id="_11" name="t_ULong" type="_24" context="_1" location="f1:10" file="f1" line="10"/>
+ <Typedef id="_12" name="t_LongLong" type="_25" context="_1" location="f1:11" file="f1" line="11"/>
+ <Typedef id="_13" name="t_ULongLong" type="_26" context="_1" location="f1:12" file="f1" line="12"/>
+ <Typedef id="_14" name="t_Float" type="_27" context="_1" location="f1:13" file="f1" line="13"/>
+ <Typedef id="_15" name="t_Double" type="_28" context="_1" location="f1:14" file="f1" line="14"/>
+ <FundamentalType id="_16" name="char" size="8" align="8"/>
+ <FundamentalType id="_17" name="signed char" size="8" align="8"/>
+ <FundamentalType id="_18" name="unsigned char" size="8" align="8"/>
+ <FundamentalType id="_19" name="short int" size="16" align="16"/>
+ <FundamentalType id="_20" name="short unsigned int" size="16" align="16"/>
+ <FundamentalType id="_21" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_22" name="unsigned int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_23" name="long int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_24" name="long unsigned int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_25" name="long long int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_26" name="long long unsigned int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_27" name="float" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_28" name="double" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/FundamentalTypes.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.GNU-float128-nostart.xml.txt b/test/expect/castxml1.any.GNU-float128-nostart.xml.txt
new file mode 100644
index 0000000..c46a97b
--- /dev/null
+++ b/test/expect/castxml1.any.GNU-float128-nostart.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+.*<FundamentalType id="_[0-9]+" name="__float128" size="128" align="128"/>.*
+ <File id="f1" name=".*/test/input/GNU-float128-nostart.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.GNU-float128.xml.txt b/test/expect/castxml1.any.GNU-float128.xml.txt
new file mode 100644
index 0000000..1f0d86f
--- /dev/null
+++ b/test/expect/castxml1.any.GNU-float128.xml.txt
@@ -0,0 +1,14 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
+ <Function id="_3" name="f" returns="_6" context="_1" location="f1:4" file="f1" line="4" mangled="">
+ <Argument type="_6" location="f1:4" file="f1" line="4"/>
+ </Function>
+ <Variable id="_4" name="v" type="_6" init="" context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/>
+ <Variable id="_5" name="pa" type="_7" context="_1" location="f1:6" file="f1" line="6" mangled="[^"]*"/>
+ <FundamentalType id="_6" name="__float128" size="128" align="128"/>
+ <PointerType id="_7" type="_8"/>
+ <Namespace id="_2" name="::"/>
+ <Struct id="_8" name="A&lt;__float128&gt;" context="_2" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <File id="f1" name=".*/test/input/GNU-float128.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.GNU-va_arg_pack.xml.txt b/test/expect/castxml1.any.GNU-va_arg_pack.xml.txt
new file mode 100644
index 0000000..b688e54
--- /dev/null
+++ b/test/expect/castxml1.any.GNU-va_arg_pack.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" inline="1" mangled="[^"]+">
+ <Argument name="n" type="_2" location="f1:1" file="f1" line="1"/>
+ <Ellipsis/>
+ </Function>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/GNU-va_arg_pack.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method-Argument-default-cast.xml.txt b/test/expect/castxml1.any.Method-Argument-default-cast.xml.txt
new file mode 100644
index 0000000..e3ef009
--- /dev/null
+++ b/test/expect/castxml1.any.Method-Argument-default-cast.xml.txt
@@ -0,0 +1,27 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7 _8 _9" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_3" name="Class" context="_1" access="private" location="f1:3" file="f1" line="3" incomplete="1"/>
+ <Typedef id="_4" name="Int" type="_10" context="_1" access="private" location="f1:4" file="f1" line="4"/>
+ <Method id="_5" name="f" returns="_10" context="_1" access="private" location="f1:5" file="f1" line="5" mangled="[^"]+">
+ <Argument type="_4" location="f1:5" file="f1" line="5" default="\(int\)0"/>
+ <Argument type="_11" location="f1:5" file="f1" line="5" default="\(start::Class \*\)0"/>
+ <Argument type="_11" location="f1:5" file="f1" line="5" default="static_cast&lt;start::Class \*&gt;\(0\)"/>
+ <Argument type="_11" location="f1:6" file="f1" line="6" default="reinterpret_cast&lt;start::Class \*&gt;\(0\)"/>
+ </Method>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_12" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_8" name="=" returns="_13" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_12" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_9" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_10" name="int" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_11" type="_3"/>
+ <ReferenceType id="_12" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_13" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method-Argument-default-cast.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method-Argument-default.xml.txt b/test/expect/castxml1.any.Method-Argument-default.xml.txt
new file mode 100644
index 0000000..e7481e3
--- /dev/null
+++ b/test/expect/castxml1.any.Method-Argument-default.xml.txt
@@ -0,0 +1,23 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_3" name="C" type="_9c" init="0" context="_1" access="private" location="f1:3" file="f1" line="3" static="1" mangled="[^"]+"/>
+ <Method id="_4" name="method" returns="_9" context="_1" access="private" location="f1:4" file="f1" line="4" mangled="[^"]+">
+ <Argument type="_9" location="f1:4" file="f1" line="4" default="start::C"/>
+ </Method>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_11" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_11" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method-Argument-default.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method-annotate.xml.txt b/test/expect/castxml1.any.Method-annotate.xml.txt
new file mode 100644
index 0000000..66cdb40
--- /dev/null
+++ b/test/expect/castxml1.any.Method-annotate.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="annotate\(an annotation\)">
+ <Argument type="_8" location="f1:3" file="f1" line="3"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method-overrides.xml.txt b/test/expect/castxml1.any.Method-overrides.xml.txt
new file mode 100644
index 0000000..d3ffc30
--- /dev/null
+++ b/test/expect/castxml1.any.Method-overrides.xml.txt
@@ -0,0 +1,38 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:5" file="f1" line="5" members="_3 _4 _5 _6 _7" bases="_8" size="[0-9]+" align="[0-9]+">
+ <Base type="_8" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Method id="_3" name="method" returns="_9" context="_1" access="private" location="f1:7" file="f1" line="7" virtual="1" overrides="_10" mangled="[^"]+">
+ <Argument type="_9" location="f1:7" file="f1" line="7"/>
+ </Method>
+ <OperatorMethod id="_4" name="=" returns="_11" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_12" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_5" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_7" name="start" context="_1" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?>
+ <Argument type="_12" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <Class id="_8" name="base" context="_2" location="f1:1" file="f1" line="1" members="_10 _13 _14 _15 _16" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_10" name="method" returns="_9" context="_8" access="private" location="f1:3" file="f1" line="3" virtual="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:3" file="f1" line="3"/>
+ </Method>
+ <ReferenceType id="_11" type="_1"/>
+ <ReferenceType id="_12" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <OperatorMethod id="_13" name="=" returns="_17" context="_8" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_18" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_14" name="base" context="_8" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_15" name="base" context="_8" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_16" name="base" context="_8" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_18" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <ReferenceType id="_17" type="_8"/>
+ <ReferenceType id="_18" type="_8c"/>
+ <CvQualifiedType id="_8c" type="_8" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method-overrides.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method-rvalue-reference.xml.txt b/test/expect/castxml1.any.Method-rvalue-reference.xml.txt
new file mode 100644
index 0000000..039564d
--- /dev/null
+++ b/test/expect/castxml1.any.Method-rvalue-reference.xml.txt
@@ -0,0 +1,18 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6" size="[0-9]+" align="[0-9]+"/>
+ <Constructor id="_3" name="start" context="_1" access="private" location="f1:3" file="f1" line="3">
+ <Argument type="_7" location="f1:3" file="f1" line="3"/>
+ </Constructor>
+ <OperatorMethod id="_4" name="=" returns="_7" context="_1" access="private" location="f1:5" file="f1" line="5" mangled="[^"]+">
+ <Argument type="_7" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Method id="_5" name="method" returns="_8" context="_1" access="private" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_8" location="f1:7" file="f1" line="7"/>
+ </Method>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_7" type="_1"/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method-rvalue-reference.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Method.xml.txt b/test/expect/castxml1.any.Method.xml.txt
new file mode 100644
index 0000000..ba942c4
--- /dev/null
+++ b/test/expect/castxml1.any.Method.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Method id="_3" name="method" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+">
+ <Argument type="_8" location="f1:3" file="f1" line="3"/>
+ </Method>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Method.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.MethodType-cv.xml.txt b/test/expect/castxml1.any.MethodType-cv.xml.txt
new file mode 100644
index 0000000..c778606
--- /dev/null
+++ b/test/expect/castxml1.any.MethodType-cv.xml.txt
@@ -0,0 +1,13 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2cv" context="_3" location="f1:2" file="f1" line="2"/>
+ <PointerType id="_2" type="_4"/>
+ <CvQualifiedType id="_2cv" type="_2" const="1" volatile="1"/>
+ <Namespace id="_3" name="::"/>
+ <MethodType id="_4" basetype="_5" returns="_6" const="1" volatile="1">
+ <Argument type="_6"/>
+ </MethodType>
+ <Class id="_5" name="A" context="_3" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/MethodType-cv.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.MethodType.xml.txt b/test/expect/castxml1.any.MethodType.xml.txt
new file mode 100644
index 0000000..59b62dd
--- /dev/null
+++ b/test/expect/castxml1.any.MethodType.xml.txt
@@ -0,0 +1,12 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:2" file="f1" line="2"/>
+ <PointerType id="_2" type="_4"/>
+ <Namespace id="_3" name="::"/>
+ <MethodType id="_4" basetype="_5" returns="_6">
+ <Argument type="_6"/>
+ </MethodType>
+ <Class id="_5" name="A" context="_3" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/MethodType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-Class-members.xml.txt b/test/expect/castxml1.any.Namespace-Class-members.xml.txt
new file mode 100644
index 0000000..90a81fa
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-Class-members.xml.txt
@@ -0,0 +1,20 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Class id="_3" name="A" context="_1" location="f1:2" file="f1" line="2" members="_4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_4" name="data" type="_9" context="_3" access="private" location="f1:4" file="f1" line="4" static="1" mangled="[^"]+"/>
+ <Constructor id="_5" name="A" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="A" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:2" file="f1" line="2"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_11" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:2" file="f1" line="2"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="A" context="_3" access="public" location="f1:2" file="f1" line="2" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_3c"/>
+ <CvQualifiedType id="_3c" type="_3" const="1"/>
+ <ReferenceType id="_11" type="_3"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-Class-members.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-Class-partial-template-members.xml.txt b/test/expect/castxml1.any.Namespace-Class-partial-template-members.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-Class-partial-template-members.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-Class-template-members.xml.txt b/test/expect/castxml1.any.Namespace-Class-template-members.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-Class-template-members.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-Function-template-members.xml.txt b/test/expect/castxml1.any.Namespace-Function-template-members.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-Function-template-members.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-anonymous.xml.txt b/test/expect/castxml1.any.Namespace-anonymous.xml.txt
new file mode 100644
index 0000000..d2a82ad
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-anonymous.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Namespace id="_3" context="_1" members="_4"/>
+ <Struct id="_4" name="A" context="_3" location="f1:3" file="f1" line="3" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-anonymous.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-empty.xml.txt b/test/expect/castxml1.any.Namespace-empty.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-empty.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-extern-C-members.xml.txt b/test/expect/castxml1.any.Namespace-extern-C-members.xml.txt
new file mode 100644
index 0000000..59b8d0a
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-extern-C-members.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Typedef id="_3" name="Int" type="_5" context="_1" location="f1:3" file="f1" line="3"/>
+ <Function id="_4" name="function" returns="_3" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]+">
+ <Argument type="_3" location="f1:4" file="f1" line="4"/>
+ </Function>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-extern-C-members.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-inline-start.xml.txt b/test/expect/castxml1.any.Namespace-inline-start.xml.txt
new file mode 100644
index 0000000..526e8fe
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-inline-start.xml.txt
@@ -0,0 +1,3 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-inline-template.xml.txt b/test/expect/castxml1.any.Namespace-inline-template.xml.txt
new file mode 100644
index 0000000..daba4eb
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-inline-template.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
+ <Struct id="_3" name="A" context="_1" location="f1:4" file="f1" line="4" incomplete="1"/>
+ <Struct id="_4" name="B&lt;start::A&gt;" context="_1" location="f1:7" file="f1" line="7" incomplete="1"/>
+ <Typedef id="_5" name="B_A" type="_4" context="_1" location="f1:8" file="f1" line="8"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-inline-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-inline.xml.txt b/test/expect/castxml1.any.Namespace-inline.xml.txt
new file mode 100644
index 0000000..190d36b
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-inline.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Struct id="_3" name="A" context="_1" location="f1:4" file="f1" line="4" incomplete="1"/>
+ <Struct id="_4" name="B" context="_1" location="f1:6" file="f1" line="6" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-inline.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-nested-1.xml.txt b/test/expect/castxml1.any.Namespace-nested-1.xml.txt
new file mode 100644
index 0000000..3ffe471
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-nested-1.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="ns1" context="_3" members="_4"/>
+ <Namespace id="_2" name="ns3" context="_3" members="_5"/>
+ <Function id="_4" name="f1" returns="_6" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Function id="_5" name="f3" returns="_6" context="_2" location="f1:9" file="f1" line="9" mangled="[^"]+"/>
+ <FundamentalType id="_6" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="start" context="_7"/>
+ <Namespace id="_7" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-nested.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-nested-2.xml.txt b/test/expect/castxml1.any.Namespace-nested-2.xml.txt
new file mode 100644
index 0000000..3ffe471
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-nested-2.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="ns1" context="_3" members="_4"/>
+ <Namespace id="_2" name="ns3" context="_3" members="_5"/>
+ <Function id="_4" name="f1" returns="_6" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Function id="_5" name="f3" returns="_6" context="_2" location="f1:9" file="f1" line="9" mangled="[^"]+"/>
+ <FundamentalType id="_6" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="start" context="_7"/>
+ <Namespace id="_7" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-nested.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-nested.xml.txt b/test/expect/castxml1.any.Namespace-nested.xml.txt
new file mode 100644
index 0000000..1d1dcbc
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-nested.xml.txt
@@ -0,0 +1,13 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
+ <Namespace id="_3" name="ns1" context="_1" members="_6"/>
+ <Namespace id="_4" name="ns2" context="_1" members="_7"/>
+ <Namespace id="_5" name="ns3" context="_1" members="_8"/>
+ <Function id="_6" name="f1" returns="_9" context="_3" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Function id="_7" name="f2" returns="_9" context="_4" location="f1:6" file="f1" line="6" mangled="[^"]+"/>
+ <Function id="_8" name="f3" returns="_9" context="_5" location="f1:9" file="f1" line="9" mangled="[^"]+"/>
+ <FundamentalType id="_9" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-nested.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-repeat-start.xml.txt b/test/expect/castxml1.any.Namespace-repeat-start.xml.txt
new file mode 100644
index 0000000..74c15a8
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-repeat-start.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Function id="_3" name="f1" returns="_5" context="_1" location="f1:2" file="f1" line="2" mangled="[^"]+"/>
+ <Function id="_4" name="f2" returns="_5" context="_1" location="f1:5" file="f1" line="5" mangled="[^"]+"/>
+ <FundamentalType id="_5" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-repeat-start.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace-repeat.xml.txt b/test/expect/castxml1.any.Namespace-repeat.xml.txt
new file mode 100644
index 0000000..1fb3a8b
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace-repeat.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Namespace id="_3" name="ns" context="_1" members="_4 _5"/>
+ <Function id="_4" name="f1" returns="_6" context="_3" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Function id="_5" name="f2" returns="_6" context="_3" location="f1:6" file="f1" line="6" mangled="[^"]+"/>
+ <FundamentalType id="_6" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Namespace-repeat.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Namespace.xml.txt b/test/expect/castxml1.any.Namespace.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.Namespace.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OffsetType-cv.xml.txt b/test/expect/castxml1.any.OffsetType-cv.xml.txt
new file mode 100644
index 0000000..5bd48fd
--- /dev/null
+++ b/test/expect/castxml1.any.OffsetType-cv.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2cv" context="_3" location="f1:2" file="f1" line="2"/>
+ <OffsetType id="_2" basetype="_4" type="_5cv"/>
+ <CvQualifiedType id="_2cv" type="_2" const="1" volatile="1"/>
+ <Class id="_4" name="A" context="_3" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_5cv" type="_5" const="1" volatile="1"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/OffsetType-cv.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OffsetType.xml.txt b/test/expect/castxml1.any.OffsetType.xml.txt
new file mode 100644
index 0000000..291efe9
--- /dev/null
+++ b/test/expect/castxml1.any.OffsetType.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:2" file="f1" line="2"/>
+ <OffsetType id="_2" basetype="_4" type="_5"/>
+ <Class id="_4" name="A" context="_3" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/OffsetType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OperatorFunction-annotate.xml.txt b/test/expect/castxml1.any.OperatorFunction-annotate.xml.txt
new file mode 100644
index 0000000..1d71226
--- /dev/null
+++ b/test/expect/castxml1.any.OperatorFunction-annotate.xml.txt
@@ -0,0 +1,13 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <OperatorFunction id="_3" name="&lt;&lt;" returns="_4" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="annotate\(an annotation\)">
+ <Argument type="_4" location="f1:3" file="f1" line="3"/>
+ <Argument type="_5" location="f1:3" file="f1" line="3"/>
+ </OperatorFunction>
+ <ReferenceType id="_4" type="_6"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <Class id="_6" name="A" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <File id="f1" name=".*/test/input/OperatorFunction-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OperatorFunction.xml.txt b/test/expect/castxml1.any.OperatorFunction.xml.txt
new file mode 100644
index 0000000..5c2f5bc
--- /dev/null
+++ b/test/expect/castxml1.any.OperatorFunction.xml.txt
@@ -0,0 +1,13 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <OperatorFunction id="_3" name="&lt;&lt;" returns="_4" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+">
+ <Argument type="_4" location="f1:3" file="f1" line="3"/>
+ <Argument type="_5" location="f1:3" file="f1" line="3"/>
+ </OperatorFunction>
+ <ReferenceType id="_4" type="_6"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <Class id="_6" name="A" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <File id="f1" name=".*/test/input/OperatorFunction.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OperatorMethod-annotate.xml.txt b/test/expect/castxml1.any.OperatorMethod-annotate.xml.txt
new file mode 100644
index 0000000..cefeba6
--- /dev/null
+++ b/test/expect/castxml1.any.OperatorMethod-annotate.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <OperatorMethod id="_3" name="&lt;&lt;" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+" attributes="annotate\(an annotation\)">
+ <Argument type="_9" location="f1:3" file="f1" line="3"/>
+ </OperatorMethod>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_8" type="_1"/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/OperatorMethod-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.OperatorMethod.xml.txt b/test/expect/castxml1.any.OperatorMethod.xml.txt
new file mode 100644
index 0000000..3435b94
--- /dev/null
+++ b/test/expect/castxml1.any.OperatorMethod.xml.txt
@@ -0,0 +1,21 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <OperatorMethod id="_3" name="&lt;&lt;" returns="_8" context="_1" access="private" location="f1:3" file="f1" line="3" mangled="[^"]+">
+ <Argument type="_9" location="f1:3" file="f1" line="3"/>
+ </OperatorMethod>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_8" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_10" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_8" type="_1"/>
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/OperatorMethod.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.PointerType.xml.txt b/test/expect/castxml1.any.PointerType.xml.txt
new file mode 100644
index 0000000..e6c5cb2
--- /dev/null
+++ b/test/expect/castxml1.any.PointerType.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <PointerType id="_2" type="_4"/>
+ <Namespace id="_3" name="::"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/PointerType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.RValueReferenceType.xml.txt b/test/expect/castxml1.any.RValueReferenceType.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.RValueReferenceType.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.ReferenceType.xml.txt b/test/expect/castxml1.any.ReferenceType.xml.txt
new file mode 100644
index 0000000..16e8809
--- /dev/null
+++ b/test/expect/castxml1.any.ReferenceType.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <ReferenceType id="_2" type="_4"/>
+ <Namespace id="_3" name="::"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/ReferenceType.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.TypeAlias.xml.txt b/test/expect/castxml1.any.TypeAlias.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.TypeAlias.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.TypeAliasTemplate.xml.txt b/test/expect/castxml1.any.TypeAliasTemplate.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.TypeAliasTemplate.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-annotate.xml.txt b/test/expect/castxml1.any.Typedef-annotate.xml.txt
new file mode 100644
index 0000000..d6dd968
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-annotate.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1" attributes="annotate\(an annotation\)"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-paren.xml.txt b/test/expect/castxml1.any.Typedef-paren.xml.txt
new file mode 100644
index 0000000..719da1d
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-paren.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-paren.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-to-Class-template.xml.txt b/test/expect/castxml1.any.Typedef-to-Class-template.xml.txt
new file mode 100644
index 0000000..d387b85
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-to-Class-template.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:3" file="f1" line="3"/>
+ <Class id="_2" name="A&lt;int&gt;" context="_3" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-to-Class-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt b/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt
new file mode 100644
index 0000000..f403de1
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-to-Enumeration-anonymous.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <Enumeration id="_2" name="start" context="_3" location="f1:1" file="f1" line="1"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-to-Enumeration-anonymous.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt b/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt
new file mode 100644
index 0000000..d5e89f3
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-to-Enumeration.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:4" file="f1" line="4"/>
+ <Enumeration id="_2" name="E" context="_3" location="f1:1" file="f1" line="1"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-to-Enumeration.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-to-FundamentalType-mode.xml.txt b/test/expect/castxml1.any.Typedef-to-FundamentalType-mode.xml.txt
new file mode 100644
index 0000000..9bcaa51
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-to-FundamentalType-mode.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="short int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-to-FundamentalType-mode.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Typedef-to-extern-C-FundamentalType-mode.xml.txt b/test/expect/castxml1.any.Typedef-to-extern-C-FundamentalType-mode.xml.txt
new file mode 100644
index 0000000..a0bfc3d
--- /dev/null
+++ b/test/expect/castxml1.any.Typedef-to-extern-C-FundamentalType-mode.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:2" file="f1" line="2"/>
+ <FundamentalType id="_2" name="short int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-to-extern-C-FundamentalType-mode.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable-annotate.xml.txt b/test/expect/castxml1.any.Variable-annotate.xml.txt
new file mode 100644
index 0000000..ebb379d
--- /dev/null
+++ b/test/expect/castxml1.any.Variable-annotate.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Variable id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+" attributes="annotate\(an annotation\)"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Variable-annotate.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable-in-Class.xml.txt b/test/expect/castxml1.any.Variable-in-Class.xml.txt
new file mode 100644
index 0000000..60e7b70
--- /dev/null
+++ b/test/expect/castxml1.any.Variable-in-Class.xml.txt
@@ -0,0 +1,19 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:1" file="f1" line="1" members="_3 _4 _5 _6 _7" size="[0-9]+" align="[0-9]+"/>
+ <Variable id="_3" name="static_field" type="_8" context="_1" access="private" location="f1:3" file="f1" line="3" static="1" mangled="[^"]+"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_6" name="=" returns="_10" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_9" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_7" name="start" context="_1" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <FundamentalType id="_8" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_9" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_10" type="_1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Variable-in-Class.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable-init-cast.xml.txt b/test/expect/castxml1.any.Variable-init-cast.xml.txt
new file mode 100644
index 0000000..64d90c0
--- /dev/null
+++ b/test/expect/castxml1.any.Variable-init-cast.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/>
+ <Typedef id="_3" name="Int" type="_6" context="_1" location="f1:2" file="f1" line="2"/>
+ <Variable id="_4" name="var_int" type="_6" init="\(int\)123" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <Variable id="_5" name="var_int2" type="_6" init="static_cast&lt;int&gt;\(123\)" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]+"/>
+ <FundamentalType id="_6" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Variable-init-cast.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable-init-ns.xml.txt b/test/expect/castxml1.any.Variable-init-ns.xml.txt
new file mode 100644
index 0000000..ce8d44d
--- /dev/null
+++ b/test/expect/castxml1.any.Variable-init-ns.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Variable id="_3" name="C" type="_5c" init="123" context="_1" location="f1:2" file="f1" line="2" static="1" mangled="[^"]+"/>
+ <Variable id="_4" name="var_int" type="_5" init="start::C" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <CvQualifiedType id="_5c" type="_5" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Variable-init-ns.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable-init.xml.txt b/test/expect/castxml1.any.Variable-init.xml.txt
new file mode 100644
index 0000000..263c572
--- /dev/null
+++ b/test/expect/castxml1.any.Variable-init.xml.txt
@@ -0,0 +1,12 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3 _4"/>
+ <Variable id="_3" name="var_int" type="_5" init="123" context="_1" location="f1:2" file="f1" line="2" mangled="[^"]+"/>
+ <Variable id="_4" name="var_str" type="_6" init="&quot;abc&quot;" context="_1" location="f1:3" file="f1" line="3" mangled="[^"]+"/>
+ <FundamentalType id="_5" name="int" size="[0-9]+" align="[0-9]+"/>
+ <PointerType id="_6" type="_7c"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <Namespace id="_2" name="::"/>
+ <FundamentalType id="_7" name="char" size="[0-9]+" align="[0-9]+"/>
+ <File id="f1" name=".*/test/input/Variable-init.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.Variable.xml.txt b/test/expect/castxml1.any.Variable.xml.txt
new file mode 100644
index 0000000..5ef5615
--- /dev/null
+++ b/test/expect/castxml1.any.Variable.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Variable id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Variable.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.implicit-decl-ms.xml.txt b/test/expect/castxml1.any.implicit-decl-ms.xml.txt
new file mode 100644
index 0000000..795a87f
--- /dev/null
+++ b/test/expect/castxml1.any.implicit-decl-ms.xml.txt
@@ -0,0 +1,11 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+ <Argument type="_2" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <Typedef id="_2" name="size_t" type="_4" context="_3" location="f0:0" file="f0" line="0"/>
+ <FundamentalType id="_4" name="unsigned int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f0" name="&lt;builtin&gt;"/>
+ <File id="f1" name=".*/test/input/implicit-decl-ms.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.inline-asm-ms.xml.txt b/test/expect/castxml1.any.inline-asm-ms.xml.txt
new file mode 100644
index 0000000..f55473f
--- /dev/null
+++ b/test/expect/castxml1.any.inline-asm-ms.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+"/>
+ <FundamentalType id="_2" name="void" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/inline-asm-ms.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.invalid-decl-for-type.xml.txt b/test/expect/castxml1.any.invalid-decl-for-type.xml.txt
new file mode 100644
index 0000000..c7cdaf5
--- /dev/null
+++ b/test/expect/castxml1.any.invalid-decl-for-type.xml.txt
@@ -0,0 +1,32 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Struct id="_1" name="start" context="_2" location="f1:12" file="f1" line="12" members="_3 _4 _5 _6 _7 _8" size="[0-9]+" align="[0-9]+"/>
+ <Field id="_3" name="b" type="_9" context="_1" access="public" location="f1:14" file="f1" line="14" offset="0"/>
+ <Typedef id="_4" name="type" type="_10" context="_1" access="public" location="f1:15" file="f1" line="15"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?>
+ <Argument type="_11" location="f1:12" file="f1" line="12"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_12" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_11" location="f1:12" file="f1" line="12"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Struct id="_9" name="B&lt;Incomplete&gt;" context="_2" location="f1:7" file="f1" line="7" members="_13 _14 _15 _16" size="[0-9]+" align="[0-9]+"/>
+ <Struct id="_10" name="A&lt;Incomplete&gt;" context="_2" location="f1:2" file="f1" line="2" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_11" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_12" type="_1"/>
+ <Constructor id="_13" name="B" context="_9" access="public" location="f1:9" file="f1" line="9" inline="1"/>
+ <Constructor id="_14" name="B" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")?>
+ <Argument type="_17" location="f1:7" file="f1" line="7"/>
+ </Constructor>
+ <OperatorMethod id="_15" name="=" returns="_18" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_17" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_16" name="B" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_17" type="_9c"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <ReferenceType id="_18" type="_9"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/invalid-decl-for-type.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.nostart.xml.txt b/test/expect/castxml1.any.nostart.xml.txt
new file mode 100644
index 0000000..4d4ece0
--- /dev/null
+++ b/test/expect/castxml1.any.nostart.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="::" members="[^"]*"/>
+.*<Class id="_[0-9]+" name="A" context="_1" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <OperatorFunction id="_[0-9]+" name="\+" returns="_[0-9]+" context="_1" location="f1:2" file="f1" line="2" mangled="[^"]*">
+ <Argument type="_[0-9]+" location="f1:2" file="f1" line="2"/>
+ <Argument type="_[0-9]+" location="f1:2" file="f1" line="2"/>
+ </OperatorFunction>.*
+ <File id="f1" name=".*/test/input/nostart.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.qualified-type-name.xml.txt b/test/expect/castxml1.any.qualified-type-name.xml.txt
new file mode 100644
index 0000000..d1d4ea4
--- /dev/null
+++ b/test/expect/castxml1.any.qualified-type-name.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:4" file="f1" line="4"/>
+ <Typedef id="_2" name="type" type="_4" context="_5" location="f1:2" file="f1" line="2"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <Namespace id="_5" name="ns" context="_3"/>
+ <File id="f1" name=".*/test/input/qualified-type-name.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.using-declaration-class.xml.txt b/test/expect/castxml1.any.using-declaration-class.xml.txt
new file mode 100644
index 0000000..bce3add
--- /dev/null
+++ b/test/expect/castxml1.any.using-declaration-class.xml.txt
@@ -0,0 +1,39 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:6" file="f1" line="6" members="_3 _4 _5 _6 _7 _8" bases="_9" size="[0-9]+" align="[0-9]+">
+ <Base type="_9" access="public" virtual="0" offset="0"/>
+ </Class>
+ <Method id="_3" name="f" returns="_10" context="_9" access="protected" location="f1:4" file="f1" line="4" mangled="[^"]+">
+ <Argument type="_10" location="f1:4" file="f1" line="4"/>
+ </Method>
+ <Method id="_4" name="f" returns="_10" context="_1" access="private" location="f1:9" file="f1" line="9" mangled="[^"]+">
+ <Argument type="_11" location="f1:9" file="f1" line="9"/>
+ </Method>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?>
+ <Argument type="_12" location="f1:6" file="f1" line="6"/>
+ </Constructor>
+ <OperatorMethod id="_7" name="=" returns="_13" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_12" location="f1:6" file="f1" line="6"/>
+ </OperatorMethod>
+ <Destructor id="_8" name="start" context="_1" access="public" location="f1:6" file="f1" line="6" inline="1" artificial="1"( throw="")?/>
+ <Class id="_9" name="base" context="_2" location="f1:1" file="f1" line="1" members="_3 _14 _15 _16 _17" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_10" name="int" size="[0-9]+" align="[0-9]+"/>
+ <FundamentalType id="_11" name="char" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_12" type="_1c"/>
+ <CvQualifiedType id="_1c" type="_1" const="1"/>
+ <ReferenceType id="_13" type="_1"/>
+ <Constructor id="_14" name="base" context="_9" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_15" name="base" context="_9" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?>
+ <Argument type="_18" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_16" name="=" returns="_19" context="_9" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")? mangled="[^"]+">
+ <Argument type="_18" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_17" name="base" context="_9" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_18" type="_9c"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <ReferenceType id="_19" type="_9"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/using-declaration-class.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.using-declaration-ns.xml.txt b/test/expect/castxml1.any.using-declaration-ns.xml.txt
new file mode 100644
index 0000000..ac2946a
--- /dev/null
+++ b/test/expect/castxml1.any.using-declaration-ns.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2" members="_3"/>
+ <Class id="_3" name="A" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/using-declaration-ns.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.using-declaration-start.xml.txt b/test/expect/castxml1.any.using-declaration-start.xml.txt
new file mode 100644
index 0000000..321f706
--- /dev/null
+++ b/test/expect/castxml1.any.using-declaration-start.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <Namespace id="_2" name="N" context="_3"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/using-declaration-start.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.using-directive-ns.xml.txt b/test/expect/castxml1.any.using-directive-ns.xml.txt
new file mode 100644
index 0000000..6502658
--- /dev/null
+++ b/test/expect/castxml1.any.using-directive-ns.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Namespace id="_1" name="start" context="_2"/>
+ <Namespace id="_2" name="::"/>
+</CastXML>$
diff --git a/test/expect/castxml1.any.using-directive-start.xml.txt b/test/expect/castxml1.any.using-directive-start.xml.txt
new file mode 100644
index 0000000..5230e37
--- /dev/null
+++ b/test/expect/castxml1.any.using-directive-start.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <Namespace id="_2" name="A" context="_3"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/using-directive-start.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.broken.any.ReferenceType-to-Class-template.xml.txt b/test/expect/castxml1.broken.any.ReferenceType-to-Class-template.xml.txt
new file mode 100644
index 0000000..58379a5
--- /dev/null
+++ b/test/expect/castxml1.broken.any.ReferenceType-to-Class-template.xml.txt
@@ -0,0 +1,25 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_4" context="_5" location="f1:5" file="f1" line="5" mangled="[^"]+">
+ <Argument type="_6" location="f1:5" file="f1" line="5"/>
+ <Argument type="_7" location="f1:5" file="f1" line="5"/>
+ </Function>
+ <Function id="_2" name="start" returns="_4" context="_5" location="f1:6" file="f1" line="6" mangled="[^"]+">
+ <Argument type="_8" location="f1:6" file="f1" line="6"/>
+ <Argument type="_9" location="f1:6" file="f1" line="6"/>
+ </Function>
+ <Function id="_3" name="start" returns="_4" context="_5" location="f1:7" file="f1" line="7" mangled="[^"]+">
+ <Argument type="_10" location="f1:7" file="f1" line="7"/>
+ <Argument type="_11" location="f1:7" file="f1" line="7"/>
+ </Function>
+ <FundamentalType id="_4" name="void" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_6" type="_12"/>
+ <FundamentalType id="_7" name="short int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_8" type="_12"/>(broken: duplicate ReferenceType)?
+ <FundamentalType id="_9" name="int" size="[0-9]+" align="[0-9]+"/>
+ <ReferenceType id="_10" type="_12"/>(broken: duplicate ReferenceType)?
+ <FundamentalType id="_11" name="long int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_5" name="::"/>
+ <Class id="_12" name="A&lt;int&gt;" context="_5" location="f1:2" file="f1" line="2" incomplete="1"/>
+ <File id="f1" name=".*/test/input/ReferenceType-to-Class-template.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++11.Class-bases.xml.txt b/test/expect/castxml1.c++11.Class-bases.xml.txt
new file mode 100644
index 0000000..7b2c6cc
--- /dev/null
+++ b/test/expect/castxml1.c++11.Class-bases.xml.txt
@@ -0,0 +1,57 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:10" file="f1" line="10" members="_3 _4 _5 _6" bases="_7 private:_8 protected:_9" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="private" virtual="0" offset="[0-9]+"/>
+ <Base type="_9" access="protected" virtual="1"/>
+ </Class>
+ <OperatorMethod id="_3" name="=" returns="_10" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </OperatorMethod>
+ <Destructor id="_4" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1"/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </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:4" file="f1" line="4" members="_16 _17 _18 _19" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_9" name="base_protected" context="_2" location="f1:7" file="f1" line="7" 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:4" file="f1" line="4" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_27" location="f1:4" file="f1" line="4"/>
+ </OperatorMethod>
+ <Destructor id="_17" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_18" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_19" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1">
+ <Argument type="_27" location="f1:4" file="f1" line="4"/>
+ </Constructor>
+ <OperatorMethod id="_20" name="=" returns="_28" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_29" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_21" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"/>
+ <Constructor id="_22" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"/>
+ <Constructor id="_23" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1">
+ <Argument type="_29" location="f1:7" file="f1" line="7"/>
+ </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"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++11.Class-template-bases.xml.txt b/test/expect/castxml1.c++11.Class-template-bases.xml.txt
new file mode 100644
index 0000000..2245a4e
--- /dev/null
+++ b/test/expect/castxml1.c++11.Class-template-bases.xml.txt
@@ -0,0 +1,44 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:12" file="f1" line="12" members="_3 _4 _5 _6" bases="_7 _8" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="public" virtual="0" offset="[0-9]+"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" 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:5" file="f1" line="5" 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:5" file="f1" line="5" inline="1" artificial="1"/>
+ <Constructor id="_16" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_17" name="=" returns="_22" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_18" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" 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"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++14.Class-bases.xml.txt b/test/expect/castxml1.c++14.Class-bases.xml.txt
new file mode 100644
index 0000000..7b2c6cc
--- /dev/null
+++ b/test/expect/castxml1.c++14.Class-bases.xml.txt
@@ -0,0 +1,57 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:10" file="f1" line="10" members="_3 _4 _5 _6" bases="_7 private:_8 protected:_9" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="private" virtual="0" offset="[0-9]+"/>
+ <Base type="_9" access="protected" virtual="1"/>
+ </Class>
+ <OperatorMethod id="_3" name="=" returns="_10" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </OperatorMethod>
+ <Destructor id="_4" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1"/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1"/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </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:4" file="f1" line="4" members="_16 _17 _18 _19" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_9" name="base_protected" context="_2" location="f1:7" file="f1" line="7" 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:4" file="f1" line="4" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_27" location="f1:4" file="f1" line="4"/>
+ </OperatorMethod>
+ <Destructor id="_17" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_18" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"/>
+ <Constructor id="_19" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1">
+ <Argument type="_27" location="f1:4" file="f1" line="4"/>
+ </Constructor>
+ <OperatorMethod id="_20" name="=" returns="_28" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_29" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_21" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"/>
+ <Constructor id="_22" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"/>
+ <Constructor id="_23" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1">
+ <Argument type="_29" location="f1:7" file="f1" line="7"/>
+ </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"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++14.Class-template-bases.xml.txt b/test/expect/castxml1.c++14.Class-template-bases.xml.txt
new file mode 100644
index 0000000..2245a4e
--- /dev/null
+++ b/test/expect/castxml1.c++14.Class-template-bases.xml.txt
@@ -0,0 +1,44 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:12" file="f1" line="12" members="_3 _4 _5 _6" bases="_7 _8" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="public" virtual="0" offset="[0-9]+"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" 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:5" file="f1" line="5" 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:5" file="f1" line="5" inline="1" artificial="1"/>
+ <Constructor id="_16" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_17" name="=" returns="_22" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1" mangled="[^"]+">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_18" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" 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"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++98.CXXLiteral.result.txt b/test/expect/castxml1.c++98.CXXLiteral.result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/test/expect/castxml1.c++98.CXXLiteral.result.txt
@@ -0,0 +1 @@
+1
diff --git a/test/expect/castxml1.c++98.CXXLiteral.stderr.txt b/test/expect/castxml1.c++98.CXXLiteral.stderr.txt
new file mode 100644
index 0000000..14fd5d6
--- /dev/null
+++ b/test/expect/castxml1.c++98.CXXLiteral.stderr.txt
@@ -0,0 +1 @@
+error: expected a type
diff --git a/test/expect/castxml1.c++98.CXXLiteral.xml.txt b/test/expect/castxml1.c++98.CXXLiteral.xml.txt
new file mode 100644
index 0000000..f276847
--- /dev/null
+++ b/test/expect/castxml1.c++98.CXXLiteral.xml.txt
@@ -0,0 +1 @@
+\(missing\)
diff --git a/test/expect/castxml1.c++98.Class-bases.xml.txt b/test/expect/castxml1.c++98.Class-bases.xml.txt
new file mode 100644
index 0000000..c82141f
--- /dev/null
+++ b/test/expect/castxml1.c++98.Class-bases.xml.txt
@@ -0,0 +1,57 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start" context="_2" location="f1:10" file="f1" line="10" members="_3 _4 _5 _6" bases="_7 private:_8 protected:_9" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="private" virtual="0" offset="[0-9]+"/>
+ <Base type="_9" access="protected" virtual="1"/>
+ </Class>
+ <OperatorMethod id="_3" name="=" returns="_10" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </OperatorMethod>
+ <Destructor id="_4" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_5" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1" throw=""/>
+ <Constructor id="_6" name="start" context="_1" access="public" location="f1:10" file="f1" line="10" inline="1" artificial="1" throw="">
+ <Argument type="_11" location="f1:10" file="f1" line="10"/>
+ </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:4" file="f1" line="4" members="_16 _17 _18 _19" size="[0-9]+" align="[0-9]+"/>
+ <Class id="_9" name="base_protected" context="_2" location="f1:7" file="f1" line="7" 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"/>
+ <Constructor id="_12" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" throw=""/>
+ <Constructor id="_13" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" throw="">
+ <Argument type="_24" location="f1:1" file="f1" line="1"/>
+ </Constructor>
+ <OperatorMethod id="_14" name="=" returns="_25" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_24" location="f1:1" file="f1" line="1"/>
+ </OperatorMethod>
+ <Destructor id="_15" name="base_public" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_16" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1" throw=""/>
+ <Constructor id="_17" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1" throw="">
+ <Argument type="_26" location="f1:4" file="f1" line="4"/>
+ </Constructor>
+ <OperatorMethod id="_18" name="=" returns="_27" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_26" location="f1:4" file="f1" line="4"/>
+ </OperatorMethod>
+ <Destructor id="_19" name="base_private" context="_8" access="public" location="f1:4" file="f1" line="4" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_20" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1" throw=""/>
+ <Constructor id="_21" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1" throw="">
+ <Argument type="_28" location="f1:7" file="f1" line="7"/>
+ </Constructor>
+ <OperatorMethod id="_22" name="=" returns="_29" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_28" location="f1:7" file="f1" line="7"/>
+ </OperatorMethod>
+ <Destructor id="_23" name="base_protected" context="_9" access="public" location="f1:7" file="f1" line="7" inline="1" artificial="1"( throw="")?/>
+ <ReferenceType id="_24" type="_7c"/>
+ <CvQualifiedType id="_7c" type="_7" const="1"/>
+ <ReferenceType id="_25" type="_7"/>
+ <ReferenceType id="_26" type="_8c"/>
+ <CvQualifiedType id="_8c" type="_8" const="1"/>
+ <ReferenceType id="_27" type="_8"/>
+ <ReferenceType id="_28" type="_9c"/>
+ <CvQualifiedType id="_9c" type="_9" const="1"/>
+ <ReferenceType id="_29" type="_9"/>
+ <Namespace id="_2" name="::"/>
+ <File id="f1" name=".*/test/input/Class-bases.cxx"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++98.Class-template-bases.xml.txt b/test/expect/castxml1.c++98.Class-template-bases.xml.txt
new file mode 100644
index 0000000..0883c53
--- /dev/null
+++ b/test/expect/castxml1.c++98.Class-template-bases.xml.txt
@@ -0,0 +1,44 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Class id="_1" name="start&lt;int&gt;" context="_2" location="f1:12" file="f1" line="12" members="_3 _4 _5 _6" bases="_7 _8" size="[0-9]+" align="[0-9]+">
+ <Base type="_7" access="public" virtual="0" offset="[0-9]+"/>
+ <Base type="_8" access="public" virtual="0" offset="[0-9]+"/>
+ </Class>
+ <Constructor id="_3" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_4" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1" throw="">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </Constructor>
+ <OperatorMethod id="_5" name="=" returns="_10" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_9" location="f1:12" file="f1" line="12"/>
+ </OperatorMethod>
+ <Destructor id="_6" name="start" context="_1" access="public" location="f1:12" file="f1" line="12" inline="1" artificial="1"( throw="")?/>
+ <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:5" file="f1" line="5" 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"( throw="")?/>
+ <Constructor id="_12" name="non_dependent_base" context="_7" access="public" location="f1:1" file="f1" line="1" inline="1" artificial="1" throw="">
+ <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" throw="" 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"( throw="")?/>
+ <Constructor id="_15" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <Constructor id="_16" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1" throw="">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </Constructor>
+ <OperatorMethod id="_17" name="=" returns="_22" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1" throw="" mangled="[^"]+">
+ <Argument type="_21" location="f1:5" file="f1" line="5"/>
+ </OperatorMethod>
+ <Destructor id="_18" name="dependent_base" context="_8" access="public" location="f1:5" file="f1" line="5" inline="1" artificial="1"( throw="")?/>
+ <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"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c++98.Function-rvalue-reference.stderr.txt b/test/expect/castxml1.c++98.Function-rvalue-reference.stderr.txt
new file mode 100644
index 0000000..6dbbb9d
--- /dev/null
+++ b/test/expect/castxml1.c++98.Function-rvalue-reference.stderr.txt
@@ -0,0 +1 @@
+warning: rvalue references are a C\+\+11 extension
diff --git a/test/expect/castxml1.c++98.Method-rvalue-reference.stderr.txt b/test/expect/castxml1.c++98.Method-rvalue-reference.stderr.txt
new file mode 100644
index 0000000..6dbbb9d
--- /dev/null
+++ b/test/expect/castxml1.c++98.Method-rvalue-reference.stderr.txt
@@ -0,0 +1 @@
+warning: rvalue references are a C\+\+11 extension
diff --git a/test/expect/castxml1.c++98.RValueReferenceType.stderr.txt b/test/expect/castxml1.c++98.RValueReferenceType.stderr.txt
new file mode 100644
index 0000000..6dbbb9d
--- /dev/null
+++ b/test/expect/castxml1.c++98.RValueReferenceType.stderr.txt
@@ -0,0 +1 @@
+warning: rvalue references are a C\+\+11 extension
diff --git a/test/expect/castxml1.c++98.TypeAlias.stderr.txt b/test/expect/castxml1.c++98.TypeAlias.stderr.txt
new file mode 100644
index 0000000..02b944f
--- /dev/null
+++ b/test/expect/castxml1.c++98.TypeAlias.stderr.txt
@@ -0,0 +1 @@
+warning: alias declarations are a C\+\+11 extension
diff --git a/test/expect/castxml1.c++98.TypeAliasTemplate.stderr.txt b/test/expect/castxml1.c++98.TypeAliasTemplate.stderr.txt
new file mode 100644
index 0000000..02b944f
--- /dev/null
+++ b/test/expect/castxml1.c++98.TypeAliasTemplate.stderr.txt
@@ -0,0 +1 @@
+warning: alias declarations are a C\+\+11 extension
diff --git a/test/expect/castxml1.c.FunctionNoProto.xml.txt b/test/expect/castxml1.c.FunctionNoProto.xml.txt
new file mode 100644
index 0000000..76a7626
--- /dev/null
+++ b/test/expect/castxml1.c.FunctionNoProto.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/FunctionNoProto.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.FundamentalType.xml.txt b/test/expect/castxml1.c.FundamentalType.xml.txt
new file mode 100644
index 0000000..fd0cff5
--- /dev/null
+++ b/test/expect/castxml1.c.FundamentalType.xml.txt
@@ -0,0 +1,7 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/FundamentalType.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.GNU-float128-nostart.xml.txt b/test/expect/castxml1.c.GNU-float128-nostart.xml.txt
new file mode 100644
index 0000000..e578256
--- /dev/null
+++ b/test/expect/castxml1.c.GNU-float128-nostart.xml.txt
@@ -0,0 +1,5 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+.*<FundamentalType id="_[0-9]+" name="__float128" size="128" align="128"/>.*
+ <File id="f1" name=".*/test/input/GNU-float128-nostart.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.GNU-float128.xml.txt b/test/expect/castxml1.c.GNU-float128.xml.txt
new file mode 100644
index 0000000..5ee5ea2
--- /dev/null
+++ b/test/expect/castxml1.c.GNU-float128.xml.txt
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]*start[^"]*">
+ <Argument type="_2" location="f1:1" file="f1" line="1"/>
+ </Function>
+ <FundamentalType id="_2" name="__float128" size="128" align="128"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/GNU-float128.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.GNU-va_arg_pack.xml.txt b/test/expect/castxml1.c.GNU-va_arg_pack.xml.txt
new file mode 100644
index 0000000..97caa08
--- /dev/null
+++ b/test/expect/castxml1.c.GNU-va_arg_pack.xml.txt
@@ -0,0 +1,10 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" inline="1" mangled="[^"]+">
+ <Argument name="n" type="_2" location="f1:1" file="f1" line="1"/>
+ <Ellipsis/>
+ </Function>
+ <FundamentalType id="_2" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/GNU-va_arg_pack.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.Typedef-called-class.xml.txt b/test/expect/castxml1.c.Typedef-called-class.xml.txt
new file mode 100644
index 0000000..032f46c
--- /dev/null
+++ b/test/expect/castxml1.c.Typedef-called-class.xml.txt
@@ -0,0 +1,8 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+ <Typedef id="_1" name="start" type="_2" context="_3" location="f1:2" file="f1" line="2"/>
+ <Typedef id="_2" name="class" type="_4" context="_3" location="f1:1" file="f1" line="1"/>
+ <FundamentalType id="_4" name="int" size="[0-9]+" align="[0-9]+"/>
+ <Namespace id="_3" name="::"/>
+ <File id="f1" name=".*/test/input/Typedef-called-class.c"/>
+</CastXML>$
diff --git a/test/expect/castxml1.c.invalid.result.txt b/test/expect/castxml1.c.invalid.result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/test/expect/castxml1.c.invalid.result.txt
@@ -0,0 +1 @@
+1
diff --git a/test/expect/castxml1.c.invalid.stderr.txt b/test/expect/castxml1.c.invalid.stderr.txt
new file mode 100644
index 0000000..73c9062
--- /dev/null
+++ b/test/expect/castxml1.c.invalid.stderr.txt
@@ -0,0 +1 @@
+error: unknown type name 'class'