diff options
author | Tobia Tesan | 2013-04-19 00:56:28 +0200 |
---|---|---|
committer | Tobia Tesan | 2013-07-10 13:17:59 +0200 |
commit | 2e4933dcd5a07f42d130c3cff4d8ebf13c3953d6 (patch) | |
tree | 1da2a1aa62bdf04ec2e55b629a81dac5ac2546db | |
parent | 377789db771d62c2c5aa30612e97caf8f3142016 (diff) | |
download | scummvm-rg350-2e4933dcd5a07f42d130c3cff4d8ebf13c3953d6.tar.gz scummvm-rg350-2e4933dcd5a07f42d130c3cff4d8ebf13c3953d6.tar.bz2 scummvm-rg350-2e4933dcd5a07f42d130c3cff4d8ebf13c3953d6.zip |
TEST: reorganize test/common/util.h
Split a few test cases in two.
The resulting file is now better organized.
-rw-r--r-- | test/common/util.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/test/common/util.h b/test/common/util.h index c11ab740de..3bd997a38f 100644 --- a/test/common/util.h +++ b/test/common/util.h @@ -4,16 +4,16 @@ class UtilTestSuite : public CxxTest::TestSuite { public: - void test_parsebool_good() { + // Test the parseBool function - // Test the parseBool function + // 'Regular' cases that must work + // (note that the function must be case insensitive): + + void test_parsebool_yesno() { bool valasbool; bool success; - // 'Regular' cases that must work - // (note that the function must be case insensitive): - Common::String string_1 ("Yes"); success = Common::parseBool (string_1, valasbool); TS_ASSERT_EQUALS(success, 1); @@ -23,6 +23,12 @@ public: success = Common::parseBool (string_2, valasbool); TS_ASSERT_EQUALS(success, 1); TS_ASSERT_EQUALS(valasbool, 0); + } + + void test_parsebool_truefalse() { + + bool valasbool; + bool success; Common::String string_3 ("tRuE"); success = Common::parseBool (string_3, valasbool); @@ -33,6 +39,12 @@ public: success = Common::parseBool (string_4, valasbool); TS_ASSERT_EQUALS(success, 1); TS_ASSERT_EQUALS(valasbool, 0); + } + + void test_parsebool_onezero() { + + bool valasbool; + bool success; Common::String string_5 ("1"); success = Common::parseBool (string_5, valasbool); |