From 4889efc199243af54cf71accffb3f9554cba933d Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Fri, 23 Dec 2011 15:10:17 -0300 Subject: Added the "" tag, and better requirements for function signatures. Trying to find a non-qualified (without scope information) class, found in a function signature or return type, was a bad idea for it makes the parsing awfully slow when dealing with huge libraries. If the user writes a type in short form in a function signature (e.g. "SomeClass", instead of "Namespace::SomeClass"), APIExtractor will exit with a message indicating the error and the possible candidates for the type. The "" tag is for types of the target language ("PyObject" in Python, for instance) and will be handled by the generator. Reviewed by Hugo Parente Reviewed by Paulo Alcantara --- tests/testimplicitconversions.cpp | 42 ++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'tests/testimplicitconversions.cpp') diff --git a/tests/testimplicitconversions.cpp b/tests/testimplicitconversions.cpp index 86032acaf..4bc4d73fc 100644 --- a/tests/testimplicitconversions.cpp +++ b/tests/testimplicitconversions.cpp @@ -30,22 +30,20 @@ void TestImplicitConversions::testWithPrivateCtors() const char* cppCode ="\ class B;\ class C;\ - \ class A {\ A(const B&);\ public:\ A(const C&);\ };\ - \ class B {};\ class C {};\ "; const char* xmlCode = "\ - \ - \ - \ - \ - "; + \ + \ + \ + \ + "; TestUtil t(cppCode, xmlCode); AbstractMetaClassList classes = t.builder()->classes(); QCOMPARE(classes.count(), 3); @@ -65,18 +63,17 @@ void TestImplicitConversions::testWithModifiedVisibility() public:\ A(const B&);\ };\ - \ class B {};\ "; const char* xmlCode = "\ - \ - \ + \ + \ \ \ \ \ - \ - "; + \ + "; TestUtil t(cppCode, xmlCode); AbstractMetaClassList classes = t.builder()->classes(); QCOMPARE(classes.count(), 2); @@ -96,20 +93,20 @@ void TestImplicitConversions::testWithAddedCtor() public:\ A(const B&);\ };\ - \ class B {};\ class C {};\ "; const char* xmlCode = "\ - \ - \ + \ + \ + \ \ \ - \ + \ \ \ - \ - "; + \ + "; TestUtil t(cppCode, xmlCode); AbstractMetaClassList classes = t.builder()->classes(); QCOMPARE(classes.count(), 3); @@ -133,10 +130,10 @@ void TestImplicitConversions::testWithExternalConversionOperator() };\ "; const char* xmlCode = "\ - \ - \ - \ - "; + \ + \ + \ + "; TestUtil t(cppCode, xmlCode); AbstractMetaClassList classes = t.builder()->classes(); QCOMPARE(classes.count(), 2); @@ -159,4 +156,3 @@ void TestImplicitConversions::testWithExternalConversionOperator() QTEST_APPLESS_MAIN(TestImplicitConversions) #include "testimplicitconversions.moc" - -- cgit v1.2.3