From 518bdd3b5e6ca638aac909ecfdb0c11dd1fb094c Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Mon, 11 Jan 2010 14:34:35 +0100 Subject: [PATCH] Fixed testcase: setting an empty ID should remove the ID. --- tests/auto/qml/qmldesigner/coretests/testcore.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.cpp b/tests/auto/qml/qmldesigner/coretests/testcore.cpp index 54974e8328e..c848373b14d 100644 --- a/tests/auto/qml/qmldesigner/coretests/testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/testcore.cpp @@ -463,18 +463,6 @@ void TestCore::testModelCreateSubNode() expectedCalls << TestView::MethodCall("nodeIdChanged", QStringList() << "Blah" << "Blah" << ""); QCOMPARE(view->methodCalls(), expectedCalls); - try { - childNode.setId(""); - QFAIL("Setting an invalid id does not throw an exception"); - } catch (Exception &exception) { - QCOMPARE(exception.type(), QString("InvalidIdException")); - } - try { - childNode.setId(QString()); - QFAIL("Setting an invalid id does not throw an exception"); - } catch (Exception &exception) { - QCOMPARE(exception.type(), QString("InvalidIdException")); - } try { childNode.setId("invalid id"); QFAIL("Setting an invalid id does not throw an excxeption"); @@ -484,6 +472,9 @@ void TestCore::testModelCreateSubNode() QCOMPARE(childNode.id(), QString("Blah")); QCOMPARE(view->methodCalls(), expectedCalls); + + childNode.setId(QString()); + QVERIFY(childNode.id().isEmpty()); } -- GitLab