aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp b/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
index 922f1c23f..b579cb410 100644
--- a/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
@@ -256,9 +256,9 @@ struct A {
// Nothing specified, true
const AbstractMetaFunction *f1 = classA->findFunction(QLatin1String("f1"));
QVERIFY(f1);
- QVERIFY(f1->allowThread());
+ QVERIFY(!f1->allowThread());
- // 'auto' specified, should be true for nontrivial function
+ // 'auto' specified, should be false for nontrivial function
const AbstractMetaFunction *f2 = classA->findFunction(QLatin1String("f2"));
QVERIFY(f2);
QVERIFY(f2->allowThread());
@@ -303,15 +303,15 @@ void TestModifyFunction::testGlobalFunctionModification()
FunctionModificationList mods = TypeDatabase::instance()->functionModifications(QLatin1String("function(A*)"));
QCOMPARE(mods.count(), 1);
- QVector<ArgumentModification> argMods = mods.first().argument_mods;
+ QVector<ArgumentModification> argMods = mods.constFirst().argument_mods;
QCOMPARE(argMods.count(), 1);
- ArgumentModification argMod = argMods.first();
+ ArgumentModification argMod = argMods.constFirst();
QCOMPARE(argMod.replacedDefaultExpression, QLatin1String("A()"));
- const AbstractMetaFunction* func = builder->globalFunctions().first();
+ const AbstractMetaFunction *func = builder->globalFunctions().constFirst();
QVERIFY(func);
QCOMPARE(func->arguments().count(), 1);
- const AbstractMetaArgument* arg = func->arguments().first();
+ const AbstractMetaArgument *arg = func->arguments().constFirst();
QCOMPARE(arg->type()->cppSignature(), QLatin1String("A *"));
QCOMPARE(arg->originalDefaultValueExpression(), QLatin1String("0"));
QCOMPARE(arg->defaultValueExpression(), QLatin1String("A()"));
@@ -349,7 +349,7 @@ struct A : public Base {
<object-type name='A'/>
</typesystem>)XML")
<< false << false << false // exception
- << true; // allowthread
+ << false; // allowthread
// Modify one function
QTest::newRow("modify-function1")
@@ -363,7 +363,7 @@ struct A : public Base {
</object-type>
</typesystem>)XML")
<< false << false << true // exception
- << true; // allowthread
+ << false; // allowthread
// Flip defaults by modifying functions
QTest::newRow("modify-function2")
@@ -378,7 +378,7 @@ struct A : public Base {
</object-type>
</typesystem>)XML")
<< true << false << false // exception
- << true; // allowthread
+ << false; // allowthread
// Activate on type system level
QTest::newRow("typesystem-on")
@@ -428,7 +428,7 @@ struct A : public Base {
</object-type>
</typesystem>)XML")
<< true << false << false // exception
- << true; // allowthread
+ << false; // allowthread
}
void TestModifyFunction::testScopedModifications()