Changed qtextdocument, qtextdocumentlayout unittests to cleanup tmp files.
- qtextdocument unittest to remove foo.png after test. - qtextdocumentlayout unittest to remove expected.png and img.png after test. Change-Id: I42971e9128d399cadc87b9fd345c868065f180a9 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>bb10
parent
1509739d43
commit
f5ef6bc58a
|
|
@ -76,6 +76,7 @@ public:
|
|||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
void cleanupTestCase();
|
||||
private slots:
|
||||
void getSetCheck();
|
||||
void isEmpty();
|
||||
|
|
@ -231,7 +232,6 @@ tst_QTextDocument::tst_QTextDocument()
|
|||
|
||||
tst_QTextDocument::~tst_QTextDocument()
|
||||
{
|
||||
QFile::remove(QLatin1String("foo.png"));
|
||||
}
|
||||
|
||||
void tst_QTextDocument::init()
|
||||
|
|
@ -258,6 +258,11 @@ void tst_QTextDocument::cleanup()
|
|||
doc = 0;
|
||||
}
|
||||
|
||||
void tst_QTextDocument::cleanupTestCase()
|
||||
{
|
||||
QFile::remove(QLatin1String("foo.png"));
|
||||
}
|
||||
|
||||
void tst_QTextDocument::isEmpty()
|
||||
{
|
||||
QVERIFY(doc->isEmpty());
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
void cleanupTestCase();
|
||||
|
||||
private slots:
|
||||
void defaultPageSizeHandling();
|
||||
|
|
@ -85,6 +86,14 @@ void tst_QTextDocumentLayout::cleanup()
|
|||
doc = 0;
|
||||
}
|
||||
|
||||
void tst_QTextDocumentLayout::cleanupTestCase()
|
||||
{
|
||||
if (qgetenv("QTEST_KEEP_IMAGEDATA").toInt() == 0) {
|
||||
QFile::remove(QLatin1String("expected.png"));
|
||||
QFile::remove(QLatin1String("img.png"));
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QTextDocumentLayout::defaultPageSizeHandling()
|
||||
{
|
||||
QAbstractTextDocumentLayout *layout = doc->documentLayout();
|
||||
|
|
|
|||
Loading…
Reference in New Issue