aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTobia Tesan2013-04-19 00:56:28 +0200
committerTobia Tesan2013-07-10 13:17:59 +0200
commit2e4933dcd5a07f42d130c3cff4d8ebf13c3953d6 (patch)
tree1da2a1aa62bdf04ec2e55b629a81dac5ac2546db /test
parent377789db771d62c2c5aa30612e97caf8f3142016 (diff)
downloadscummvm-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.
Diffstat (limited to 'test')
-rw-r--r--test/common/util.h22
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);