diff options
author | Brad King <brad.king@kitware.com> | 2017-09-28 10:59:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-28 11:14:15 (GMT) |
commit | bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb (patch) | |
tree | d58d858b4dea372c56954f7dd7b57f6f2911a32b /test | |
parent | e51382fbcccc390a25d90f2103838c6e979e7e30 (diff) | |
download | CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.zip CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.tar.gz CastXML-bbe3117a26ad11ba74a8f2c3f0a38bf3ef9864bb.tar.bz2 |
Output: Desugar 'auto' types
When an `auto` type is encountered in an interface, desugar it
through to the deduced type.
Issue: #89
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test/expect/castxml1.any.Function-auto.xml.txt | 7 | ||||
-rw-r--r-- | test/expect/gccxml.any.Function-auto.xml.txt | 7 | ||||
-rw-r--r-- | test/input/Function-auto.cxx | 4 |
4 files changed, 24 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e2bab47..ab27c80 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -187,6 +187,11 @@ macro(castxml_test_output test) castxml_test_output_gnuxx14(${test}) endmacro() +macro(castxml_test_output_14 test) + castxml_test_output_cxx14(${test}) + castxml_test_output_gnuxx14(${test}) +endmacro() + macro(castxml_test_output_broken test) castxml_test_output_broken_cxx98(${test}) castxml_test_output_broken_gnuxx98(${test}) @@ -379,6 +384,7 @@ castxml_test_output(Enumeration-anonymous) castxml_test_output(Field) castxml_test_output(Field-annotate) castxml_test_output(Function) +castxml_test_output_14(Function-auto) castxml_test_output(Function-annotate) castxml_test_output(Function-Argument-annotate) castxml_test_output(Function-Argument-decay) diff --git a/test/expect/castxml1.any.Function-auto.xml.txt b/test/expect/castxml1.any.Function-auto.xml.txt new file mode 100644 index 0000000..1c5c692 --- /dev/null +++ b/test/expect/castxml1.any.Function-auto.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="int" size="[0-9]+" align="[0-9]+"/> + <Namespace id="_3" name="::"/> + <File id="f1" name=".*/test/input/Function-auto.cxx"/> +</CastXML>$ diff --git a/test/expect/gccxml.any.Function-auto.xml.txt b/test/expect/gccxml.any.Function-auto.xml.txt new file mode 100644 index 0000000..8069dc9 --- /dev/null +++ b/test/expect/gccxml.any.Function-auto.xml.txt @@ -0,0 +1,7 @@ +^<\?xml version="1.0"\?> +<GCC_XML[^>]*> + <Function id="_1" name="start" returns="_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/Function-auto.cxx"/> +</GCC_XML>$ diff --git a/test/input/Function-auto.cxx b/test/input/Function-auto.cxx new file mode 100644 index 0000000..fa615da --- /dev/null +++ b/test/input/Function-auto.cxx @@ -0,0 +1,4 @@ +auto start() +{ + return 1; +} |