test: migrate QDom test to QRegularExpression
This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: I74ca824d5a2ee6c295c41cd577eab466326395f0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
9fc5902d23
commit
9294d02395
@ -33,7 +33,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QRegExp>
|
#include <QRegularExpression>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include <QtXml>
|
#include <QtXml>
|
||||||
@ -437,10 +437,10 @@ void tst_QDom::save_data()
|
|||||||
QTest::addColumn<int>("indent");
|
QTest::addColumn<int>("indent");
|
||||||
QTest::addColumn<QString>("res");
|
QTest::addColumn<QString>("res");
|
||||||
|
|
||||||
QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegExp(" "), "" );
|
QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegularExpression(" "), "" );
|
||||||
QTest::newRow( "02" ) << doc01 << 1 << doc01;
|
QTest::newRow( "02" ) << doc01 << 1 << doc01;
|
||||||
QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegExp(" "), " " );
|
QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegularExpression(" "), " " );
|
||||||
QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegExp(" "), " " );
|
QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegularExpression(" "), " " );
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QDom::save()
|
void tst_QDom::save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user