diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-14 19:32:37 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:09:59 -0300 |
commit | 74d3c1bb12280ffb2b810ee4bd1272ba6fb8127f (patch) | |
tree | c87daaa1939b537b50ea94c824f620d236717003 /tests/testenum.cpp | |
parent | 46cd570358601d83be0e23a378fc688d8ed706b6 (diff) |
Added the "function" tag to ApiExtractor.
This change the behaviour of ApiExtractor regarding to global functions.
All global function you want to be exported to python *need* to be especified
in the type system with the function tag, otherwise they wont be exported at all.
The syntax for this new tag is:
<function signature="..." />
This is just the initial work for this tag, it is missign support for:
- Function modifications.
- Add a function overload with add-function tag.
Diffstat (limited to 'tests/testenum.cpp')
-rw-r--r-- | tests/testenum.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/testenum.cpp b/tests/testenum.cpp index 93a678e73..24cb4d963 100644 --- a/tests/testenum.cpp +++ b/tests/testenum.cpp @@ -41,12 +41,13 @@ void TestEnum::testEnumCppSignature() <value-type name='A'/> \ <enum-type name='GlobalEnum' />\ <enum-type name='A::ClassEnum' />\ + <function signature='func(A::ClassEnum)' />\ </typesystem>"; TestUtil t(cppCode, xmlCode); AbstractMetaClassList classes = t.builder()->classes(); QCOMPARE(classes.count(), 1); - + AbstractMetaEnumList globalEnums = t.builder()->globalEnums(); QCOMPARE(globalEnums.count(), 1); QCOMPARE(globalEnums.first()->name(), QString("GlobalEnum")); @@ -56,7 +57,7 @@ void TestEnum::testEnumCppSignature() QCOMPARE(functions.count(), 1); QCOMPARE(functions.first()->arguments().count(), 1); QCOMPARE(functions.first()->arguments().first()->type()->cppSignature(), QString("A::ClassEnum")); - + // enum as parameter of a method AbstractMetaClass* classA = classes.findClass("A"); QCOMPARE(classA->enums().count(), 1); @@ -72,8 +73,6 @@ void TestEnum::testEnumCppSignature() AbstractMetaEnumList classEnums = classA->enums(); QCOMPARE(classEnums.first()->name(), QString("ClassEnum")); - - } QTEST_APPLESS_MAIN(TestEnum) |