Skip to content

Commit b9c7959

Browse files
committed
adjusted tests for new support of unregistered types as return by value
1 parent da2cb03 commit b9c7959

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/PythonQtTests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ void PythonQtTestSlotCalling::testCppFactory()
213213
{
214214
PythonQtTestCppFactory* f = new PythonQtTestCppFactory;
215215
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");
217218
PythonQt::self()->addDecorators(new PQCppObjectNoWrapDecorator);
218219

219220
PythonQt::self()->addWrapperFactory(f);
@@ -234,6 +235,7 @@ void PythonQtTestSlotCalling::testCppFactory()
234235
QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsPtr();print a;\nif a!=None: obj.setPassed();\n"));
235236
QVERIFY(_helper->runScript("a = obj.getUnknownButRegisteredValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
236237
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);
237239
QVERIFY(_helper->runScript("a = obj.getUnknownValueObjectAsValue();print a;\nif a!=None: obj.setPassed();\n"));
238240

239241
// expect to get strict call to double overload

0 commit comments

Comments
 (0)