QFile benchmark: purge fatuous function, inline several more

The empty cleanupTestCase() was just clutter. Various tests that
shared a common implementation (using different data) might just as
well be inline in the class body.

Change-Id: I5046d7e6ad5a6425df9f9e0a0a705e229d9d0717
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Edward Welbourne 2021-07-05 18:16:12 +02:00
parent 2a71ccc232
commit cc7e0b5c2c

View File

@ -80,17 +80,16 @@ public:
}; };
private slots: private slots:
void initTestCase(); void initTestCase();
void cleanupTestCase();
void open_data(); void open_data();
void open(); void open();
void seek_data(); void seek_data();
void seek(); void seek();
void readSmallFiles_QFile(); void readSmallFiles_QFile() { readSmallFiles(); }
void readSmallFiles_QFSFileEngine(); void readSmallFiles_QFSFileEngine() { readSmallFiles(); }
void readSmallFiles_posix(); void readSmallFiles_posix() { readSmallFiles(); }
void readSmallFiles_Win32(); void readSmallFiles_Win32() { readSmallFiles(); }
void readSmallFiles_QFile_data(); void readSmallFiles_QFile_data();
void readSmallFiles_QFSFileEngine_data(); void readSmallFiles_QFSFileEngine_data();
@ -102,10 +101,10 @@ private slots:
void readBigFile_posix_data(); void readBigFile_posix_data();
void readBigFile_Win32_data(); void readBigFile_Win32_data();
void readBigFile_QFile(); void readBigFile_QFile() { readBigFile(); }
void readBigFile_QFSFileEngine(); void readBigFile_QFSFileEngine() { readBigFile(); }
void readBigFile_posix(); void readBigFile_posix() { readBigFile(); }
void readBigFile_Win32(); void readBigFile_Win32() { readBigFile(); }
private: private:
void readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b); void readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, QIODevice::OpenModeFlag b);
@ -161,10 +160,6 @@ void tst_qfile::initTestCase()
{ {
} }
void tst_qfile::cleanupTestCase()
{
}
void tst_qfile::readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, void tst_qfile::readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t,
QIODevice::OpenModeFlag b) QIODevice::OpenModeFlag b)
{ {
@ -189,17 +184,6 @@ void tst_qfile::readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t,
} }
} }
void tst_qfile::readBigFile_QFile() { readBigFile(); }
void tst_qfile::readBigFile_QFSFileEngine()
{
readBigFile();
}
void tst_qfile::readBigFile_posix()
{
readBigFile();
}
void tst_qfile::readBigFile_Win32() { readBigFile(); }
void tst_qfile::readBigFile_QFile_data() void tst_qfile::readBigFile_QFile_data()
{ {
readFile_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); readFile_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen);
@ -486,21 +470,6 @@ void tst_qfile::open()
removeFile(); removeFile();
} }
void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); }
void tst_qfile::readSmallFiles_QFSFileEngine()
{
readSmallFiles();
}
void tst_qfile::readSmallFiles_posix()
{
readSmallFiles();
}
void tst_qfile::readSmallFiles_Win32()
{
readSmallFiles();
}
void tst_qfile::readSmallFiles_QFile_data() void tst_qfile::readSmallFiles_QFile_data()
{ {
readFile_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen); readFile_data(QFileBenchmark, QIODevice::NotOpen, QIODevice::NotOpen);