diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-01-31 03:29:05 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-01-31 03:29:05 (GMT) |
commit | 2b337d8cbe8e6646ec78b3acaad50ce108d33dc0 (patch) | |
tree | 1e3def69f8767d9667558b96fb450a50125dea70 /tests/auto/declarative/qdeclarativetextedit | |
parent | bdd425b69ecfa54691c8d2de8f9aeb44e1d9b3e4 (diff) | |
download | Qt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.zip Qt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.tar.gz Qt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.tar.bz2 |
Add missing versioning tests for new QtQuick 1.1 properties/methods.
Task-number: QTBUG-15489
Reviewed-by: Bea Lam
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextedit')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index b1e0cb9..1364337 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -1513,14 +1513,14 @@ void tst_qdeclarativetextedit::testQtQuick11Attributes() QObject *obj; QDeclarativeComponent valid(&engine); - valid.setData("import QtQuick 1.1; Text { " + code.toUtf8() + " }", QUrl("")); + valid.setData("import QtQuick 1.1; TextEdit { " + code.toUtf8() + " }", QUrl("")); obj = valid.create(); QVERIFY(obj); QVERIFY(valid.errorString().isEmpty()); delete obj; QDeclarativeComponent invalid(&engine); - invalid.setData("import QtQuick 1.0; Text { " + code.toUtf8() + " }", QUrl("")); + invalid.setData("import QtQuick 1.0; TextEdit { " + code.toUtf8() + " }", QUrl("")); QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); obj = invalid.create(); QCOMPARE(invalid.errorString(), error); @@ -1540,6 +1540,18 @@ void tst_qdeclarativetextedit::testQtQuick11Attributes_data() QTest::newRow("lineCount") << "property int foo: lineCount" << "<Unknown File>:1: ReferenceError: Can't find variable: lineCount" << ""; + + QTest::newRow("moveCursorSelection") << "Component.onCompleted: moveCursorSelection(0, TextEdit.SelectCharacters)" + << "<Unknown File>:1: ReferenceError: Can't find variable: moveCursorSelection" + << ""; + + QTest::newRow("deselect") << "Component.onCompleted: deselect()" + << "<Unknown File>:1: ReferenceError: Can't find variable: deselect" + << ""; + + QTest::newRow("onLinkActivated") << "onLinkActivated: {}" + << "QDeclarativeComponent: Component is not ready" + << ":1 \"TextEdit.onLinkActivated\" is not available in QtQuick 1.0.\n"; } QTEST_MAIN(tst_qdeclarativetextedit) |