From 74d3c1bb12280ffb2b810ee4bd1272ba6fb8127f Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 14 Apr 2010 19:32:37 -0300 Subject: 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: This is just the initial work for this tag, it is missign support for: - Function modifications. - Add a function overload with add-function tag. --- tests/testenum.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/testenum.cpp') 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() \ \ \ + \ "; 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) -- cgit v1.2.3