aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testenum.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-09-20 19:29:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:10 -0300
commit47cf0c2fafd1cdf594a319a7e42c606880ce0d51 (patch)
treef9e05b310cf716919b32c47534103871ae9d5073 /tests/testenum.cpp
parente6b15c234864cc8061f43a1c238ad57b78dcc61f (diff)
Updates tests to use nesting of type declarations.
Also added a new cases to test the nesting of type tags a bit more. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/testenum.cpp')
-rw-r--r--tests/testenum.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/testenum.cpp b/tests/testenum.cpp
index 4ae6cb58a..82a0288ac 100644
--- a/tests/testenum.cpp
+++ b/tests/testenum.cpp
@@ -38,9 +38,10 @@ void TestEnum::testEnumCppSignature()
";
const char* xmlCode = "\
<typesystem package=\"Foo\"> \
- <value-type name='A'/> \
<enum-type name='GlobalEnum' />\
- <enum-type name='A::ClassEnum' />\
+ <value-type name='A'> \
+ <enum-type name='ClassEnum' />\
+ </value-type> \
<function signature='func(A::ClassEnum)' />\
</typesystem>";
@@ -85,9 +86,10 @@ void TestEnum::testEnumWithApiVersion()
";
const char* xmlCode = "\
<typesystem package=\"Foo\"> \
- <value-type name='A'/> \
- <enum-type name='A::ClassEnum' since='0.1'/>\
- <enum-type name='A::ClassEnum2' since='0.2'/>\
+ <value-type name='A'> \
+ <enum-type name='ClassEnum' since='0.1'/>\
+ <enum-type name='ClassEnum2' since='0.2'/>\
+ </value-type> \
</typesystem>";
TestUtil t(cppCode, xmlCode, true, 0.1);
@@ -106,11 +108,12 @@ void TestEnum::testAnonymousEnum()
";
const char* xmlCode = "\
<typesystem package=\"Foo\"> \
- <value-type name='A'/> \
<!-- Uses the first value of the enum to identify it. -->\
<enum-type identified-by-value='Global0'/>\
- <!-- Uses the second value of the enum to identify it. -->\
- <enum-type identified-by-value='A::A1'/>\
+ <value-type name='A'> \
+ <!-- Uses the second value of the enum to identify it. -->\
+ <enum-type identified-by-value='A1'/>\
+ </value-type> \
</typesystem>";
TestUtil t(cppCode, xmlCode, false);