diff options
author | mae <qt-info@nokia.com> | 2009-09-08 08:45:27 (GMT) |
---|---|---|
committer | mae <qt-info@nokia.com> | 2009-09-08 08:48:24 (GMT) |
commit | deff8fcf0ed060b949c3ec0fa0ec4bd81c253825 (patch) | |
tree | d90b96087a351b118012b267a2102037b56ddbbc /tests | |
parent | 115d2c10b56228fbcdab5a8506c24d7b4745d95c (diff) | |
download | Qt-deff8fcf0ed060b949c3ec0fa0ec4bd81c253825.zip Qt-deff8fcf0ed060b949c3ec0fa0ec4bd81c253825.tar.gz Qt-deff8fcf0ed060b949c3ec0fa0ec4bd81c253825.tar.bz2 |
Fix autotest
The piece table test relied on previous automatic edit command grouping. The
grouping now has to be enforced explicitely with beginEditGroup()/endEditGroup()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp index 6f8dd2b..61f4456 100644 --- a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp +++ b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp @@ -772,7 +772,9 @@ void tst_QTextPieceTable::blockRemoval1() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(5, 5); + table->endEditBlock(); QVERIFY(table->blocksFind(4).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == fmt2); QVERIFY(table->blocksFind(4).position() == 0); @@ -864,7 +866,10 @@ void tst_QTextPieceTable::blockRemoval3() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(3, 4); + table->endEditBlock(); + QVERIFY(table->blocksFind(1).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(1).position() == 0); @@ -958,7 +963,10 @@ void tst_QTextPieceTable::blockRemoval5() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(3, 8); + table->endEditBlock(); + QVERIFY(table->blocksFind(0).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(1).position() == 0); |