diff options
author | Neeraj Kumar | 2010-08-07 20:35:50 +0000 |
---|---|---|
committer | Neeraj Kumar | 2010-08-07 20:35:50 +0000 |
commit | dab72c519c7aa4ba1e7bc451222e8d0ac3367ac3 (patch) | |
tree | db64a9cc413d3d4b0af2e55d261881ace9c896bb /engines/testbed/fs.cpp | |
parent | a4a28eb16e3f2c9d1f4e79120b359821d731eecf (diff) | |
download | scummvm-rg350-dab72c519c7aa4ba1e7bc451222e8d0ac3367ac3.tar.gz scummvm-rg350-dab72c519c7aa4ba1e7bc451222e8d0ac3367ac3.tar.bz2 scummvm-rg350-dab72c519c7aa4ba1e7bc451222e8d0ac3367ac3.zip |
TESTBED: fixed default disabling of FS testsuite when game data files are not found
svn-id: r51840
Diffstat (limited to 'engines/testbed/fs.cpp')
-rw-r--r-- | engines/testbed/fs.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp index 6bd67022ee..7cae7ef6c1 100644 --- a/engines/testbed/fs.cpp +++ b/engines/testbed/fs.cpp @@ -149,21 +149,23 @@ bool FStests::testWriteFile() { FSTestSuite::FSTestSuite() { - addTest("ReadingFile", &FStests::testReadFile, false); - addTest("WritingFile", &FStests::testWriteFile, false); -} - -void FSTestSuite::enable(bool flag) { + // FS tests depend on Game Data files. + // If those are not found. Disable this testsuite. const Common::String &path = ConfMan.get("path"); Common::FSNode gameRoot(path); Common::FSNode gameIdentificationFile = gameRoot.getChild("TESTBED"); if (!gameIdentificationFile.exists()) { logPrintf("WARNING! : Game Data not found. Skipping FS tests\n"); + _isGameDataFound = false; Testsuite::enable(false); - return; } - Testsuite::enable(flag); + addTest("ReadingFile", &FStests::testReadFile, false); + addTest("WritingFile", &FStests::testWriteFile, false); +} + +void FSTestSuite::enable(bool flag) { + Testsuite::enable(_isGameDataFound & flag); } } // End of namespace Testbed |