From 2cd0aabb8a89a13660b0c0bb3ac0a90f68cf3904 2009-05-19 08:45:21 From: florianlink Date: 2009-05-19 08:45:21 Subject: [PATCH] adjusted tests for new support of unregistered types as return by value git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@83 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/tests/PythonQtTests.cpp b/tests/PythonQtTests.cpp index 29ec3b4..65f6829 100644 --- a/tests/PythonQtTests.cpp +++ b/tests/PythonQtTests.cpp @@ -213,7 +213,8 @@ void PythonQtTestSlotCalling::testCppFactory() { PythonQtTestCppFactory* f = new PythonQtTestCppFactory; PythonQt::self()->addInstanceDecorators(new PQCppObjectDecorator); - qRegisterMetaType("PQCppObjectNoWrap"); + // do not register, since we want to know if that works as well + //qRegisterMetaType("PQCppObjectNoWrap"); PythonQt::self()->addDecorators(new PQCppObjectNoWrapDecorator); PythonQt::self()->addWrapperFactory(f); @@ -234,6 +235,7 @@ void PythonQtTestSlotCalling::testCppFactory() QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n")); QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n")); QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n")); + QEXPECT_FAIL("", "Testing by value return without the object being registered as QMetaType or having registered a default constructor decorator", Continue); QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n")); // expect to get strict call to double overload