diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-04-01 08:14:52 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-04-01 10:29:28 +0200 |
commit | 4cf0962dc4d8d48aa600c5b56b160c8553782140 (patch) | |
tree | 8ee6066054363c1c44790473efc21bca62329f1c /tests/auto/qml/qqmlecmascript | |
parent | dbc6b9bfc7e6f1c7e212460105b426b8e80db671 (diff) |
Warn if too many parameters are passed to a C++ function
Change-Id: I8ddf55d48d9276be5880e89e7b854f3355891f8e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index fbb344f9a0..5dfe76c2f2 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -2694,6 +2694,8 @@ void tst_qqmlecmascript::callQtInvokables() QCOMPARE(o->actuals().count(), 0); // Excessive arguments + QTest::ignoreMessage(QtWarningMsg, qPrintable("Too many arguments, ignoring 1")); + o->reset(); QVERIFY(EVALUATE_VALUE("object.method_int(10, 11)", QV4::Primitive::undefinedValue())); QCOMPARE(o->error(), false); @@ -2701,6 +2703,8 @@ void tst_qqmlecmascript::callQtInvokables() QCOMPARE(o->actuals().count(), 1); QCOMPARE(o->actuals().at(0), QVariant(10)); + QTest::ignoreMessage(QtWarningMsg, qPrintable("Too many arguments, ignoring 1")); + o->reset(); QVERIFY(EVALUATE_VALUE("object.method_intint(10, 11, 12)", QV4::Primitive::undefinedValue())); QCOMPARE(o->error(), false); |