##// END OF EJS Templates
adjusted tests for new support of unregistered types as return by value...
florianlink -
r47:2cd0aabb8a89
parent child
Show More
@@ -213,7 +213,8 void PythonQtTestSlotCalling::testCppFactory()
213 {
213 {
214 PythonQtTestCppFactory* f = new PythonQtTestCppFactory;
214 PythonQtTestCppFactory* f = new PythonQtTestCppFactory;
215 PythonQt::self()->addInstanceDecorators(new PQCppObjectDecorator);
215 PythonQt::self()->addInstanceDecorators(new PQCppObjectDecorator);
216 qRegisterMetaType<PQCppObjectNoWrap>("PQCppObjectNoWrap");
216 // do not register, since we want to know if that works as well
217 //qRegisterMetaType<PQCppObjectNoWrap>("PQCppObjectNoWrap");
217 PythonQt::self()->addDecorators(new PQCppObjectNoWrapDecorator);
218 PythonQt::self()->addDecorators(new PQCppObjectNoWrapDecorator);
218
219
219 PythonQt::self()->addWrapperFactory(f);
220 PythonQt::self()->addWrapperFactory(f);
@@ -234,6 +235,7 void PythonQtTestSlotCalling::testCppFactory()
234 QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n"));
235 QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n"));
235 QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
236 QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
236 QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n"));
237 QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n"));
238 QEXPECT_FAIL("", "Testing by value return without the object being registered as QMetaType or having registered a default constructor decorator", Continue);
237 QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
239 QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
238
240
239 // expect to get strict call to double overload
241 // expect to get strict call to double overload
General Comments 0
You need to be logged in to leave comments. Login now