aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-04-20 19:26:50 +0000
committerMax Horn2009-04-20 19:26:50 +0000
commitfaa911794953679a1fff24999878f79612dfc7f3 (patch)
tree5b05bb39fc9b395f6381ebf81f7f001d8f07a5ca
parent6a7bb77305dc280e6af2afb4beb5cc06ca6350b8 (diff)
downloadscummvm-rg350-faa911794953679a1fff24999878f79612dfc7f3.tar.gz
scummvm-rg350-faa911794953679a1fff24999878f79612dfc7f3.tar.bz2
scummvm-rg350-faa911794953679a1fff24999878f79612dfc7f3.zip
TESTS: Code formatting; also changed some TS_ASSERT to TS_ASSERT_EQUALS
svn-id: r40026
-rw-r--r--test/common/array.h69
-rw-r--r--test/common/bufferedreadstream.h2
-rw-r--r--test/common/bufferedseekablereadstream.h4
-rw-r--r--test/common/hashmap.h12
-rw-r--r--test/common/list.h52
-rw-r--r--test/common/memoryreadstream.h6
-rw-r--r--test/common/pack.h6
-rw-r--r--test/common/rect.h12
-rw-r--r--test/common/seekablesubreadstream.h4
-rw-r--r--test/common/str.h44
-rw-r--r--test/common/stream.h4
-rw-r--r--test/common/subreadstream.h2
12 files changed, 98 insertions, 119 deletions
diff --git a/test/common/array.h b/test/common/array.h
index 9c2df993f1..2a41cd5b6a 100644
--- a/test/common/array.h
+++ b/test/common/array.h
@@ -5,8 +5,7 @@
class ArrayTestSuite : public CxxTest::TestSuite
{
public:
- void test_empty_clear( void )
- {
+ void test_empty_clear() {
Common::Array<int> array;
TS_ASSERT( array.empty() );
array.push_back(17);
@@ -16,8 +15,7 @@ class ArrayTestSuite : public CxxTest::TestSuite
TS_ASSERT( array.empty() );
}
- void test_iterator( void )
- {
+ void test_iterator() {
Common::Array<int> array;
Common::Array<int>::iterator iter;
@@ -31,22 +29,21 @@ class ArrayTestSuite : public CxxTest::TestSuite
iter = array.begin();
- TS_ASSERT( *iter == 17 );
+ TS_ASSERT_EQUALS( *iter, 17 );
++iter;
TS_ASSERT( iter != array.end() );
- TS_ASSERT( *iter == 33 );
+ TS_ASSERT_EQUALS( *iter, 33 );
++iter;
TS_ASSERT( iter != array.end() );
// Also test the postinc
- TS_ASSERT( *iter == -11 );
+ TS_ASSERT_EQUALS( *iter, -11 );
iter++;
TS_ASSERT( iter == array.end() );
}
- void test_direct_access( void )
- {
+ void test_direct_access() {
Common::Array<int> array;
// Fill the array with some random data
@@ -54,13 +51,12 @@ class ArrayTestSuite : public CxxTest::TestSuite
array.push_back(33);
array.push_back(-11);
- TS_ASSERT( array[0] == 17 );
- TS_ASSERT( array[1] == 33 );
- TS_ASSERT( array[2] == -11 );
+ TS_ASSERT_EQUALS( array[0], 17 );
+ TS_ASSERT_EQUALS( array[1], 33 );
+ TS_ASSERT_EQUALS( array[2], -11 );
}
- void test_insert_at( void )
- {
+ void test_insert_at() {
Common::Array<int> array;
// First of all some data
@@ -72,15 +68,14 @@ class ArrayTestSuite : public CxxTest::TestSuite
// Insert some data
array.insert_at(2, 33);
- TS_ASSERT( array[0] == -12 );
- TS_ASSERT( array[1] == 17 );
- TS_ASSERT( array[2] == 33 );
- TS_ASSERT( array[3] == 25 );
- TS_ASSERT( array[4] == -11 );
+ TS_ASSERT_EQUALS( array[0], -12 );
+ TS_ASSERT_EQUALS( array[1], 17 );
+ TS_ASSERT_EQUALS( array[2], 33 );
+ TS_ASSERT_EQUALS( array[3], 25 );
+ TS_ASSERT_EQUALS( array[4], -11 );
}
- void test_remove_at( void )
- {
+ void test_remove_at() {
Common::Array<int> array;
// First of all some data
@@ -93,14 +88,13 @@ class ArrayTestSuite : public CxxTest::TestSuite
// Remove some data
array.remove_at(1);
- TS_ASSERT( array[0] == -12 );
- TS_ASSERT( array[1] == 33 );
- TS_ASSERT( array[2] == 25 );
- TS_ASSERT( array[3] == -11 );
+ TS_ASSERT_EQUALS( array[0], -12 );
+ TS_ASSERT_EQUALS( array[1], 33 );
+ TS_ASSERT_EQUALS( array[2], 25 );
+ TS_ASSERT_EQUALS( array[3], -11 );
}
- void test_push_back( void )
- {
+ void test_push_back() {
Common::Array<int> array1, array2;
// Some data for both
@@ -114,16 +108,15 @@ class ArrayTestSuite : public CxxTest::TestSuite
array1.push_back(array2);
- TS_ASSERT( array1[0] == -3 );
- TS_ASSERT( array1[1] == 5 );
- TS_ASSERT( array1[2] == 9 );
- TS_ASSERT( array1[3] == 3 );
- TS_ASSERT( array1[4] == -2 );
- TS_ASSERT( array1[5] == -131 );
+ TS_ASSERT_EQUALS( array1[0], -3 );
+ TS_ASSERT_EQUALS( array1[1], 5 );
+ TS_ASSERT_EQUALS( array1[2], 9 );
+ TS_ASSERT_EQUALS( array1[3], 3 );
+ TS_ASSERT_EQUALS( array1[4], -2 );
+ TS_ASSERT_EQUALS( array1[5], -131 );
}
- void test_copy_constructor( void )
- {
+ void test_copy_constructor() {
Common::Array<int> array1;
// Some data for both
@@ -133,8 +126,8 @@ class ArrayTestSuite : public CxxTest::TestSuite
Common::Array<int> array2(array1);
- TS_ASSERT( array2[0] == -3 );
- TS_ASSERT( array2[1] == 5 );
- TS_ASSERT( array2[2] == 9 );
+ TS_ASSERT_EQUALS( array2[0], -3 );
+ TS_ASSERT_EQUALS( array2[1], 5 );
+ TS_ASSERT_EQUALS( array2[2], 9 );
}
};
diff --git a/test/common/bufferedreadstream.h b/test/common/bufferedreadstream.h
index c580fd18de..15026aa8d6 100644
--- a/test/common/bufferedreadstream.h
+++ b/test/common/bufferedreadstream.h
@@ -4,7 +4,7 @@
class BufferedReadStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_traverse(void) {
+ void test_traverse() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);
diff --git a/test/common/bufferedseekablereadstream.h b/test/common/bufferedseekablereadstream.h
index b91a27d221..ea2ffe068a 100644
--- a/test/common/bufferedseekablereadstream.h
+++ b/test/common/bufferedseekablereadstream.h
@@ -4,7 +4,7 @@
class BufferedSeekableReadStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_traverse(void) {
+ void test_traverse() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);
@@ -26,7 +26,7 @@ class BufferedSeekableReadStreamTestSuite : public CxxTest::TestSuite {
TS_ASSERT( ssrs.eos() );
}
- void test_seek(void) {
+ void test_seek() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);
diff --git a/test/common/hashmap.h b/test/common/hashmap.h
index 21cafde6b8..97c7df5bbd 100644
--- a/test/common/hashmap.h
+++ b/test/common/hashmap.h
@@ -6,7 +6,7 @@
class HashMapTestSuite : public CxxTest::TestSuite
{
public:
- void test_empty_clear(void) {
+ void test_empty_clear() {
Common::HashMap<int, int> container;
TS_ASSERT( container.empty() );
container[0] = 17;
@@ -24,7 +24,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
TS_ASSERT( container2.empty() );
}
- void test_contains(void) {
+ void test_contains() {
Common::HashMap<int, int> container;
container[0] = 17;
container[1] = 33;
@@ -42,7 +42,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
TS_ASSERT( !container2.contains("asdf") );
}
- void test_add_remove(void) {
+ void test_add_remove() {
Common::HashMap<int, int> container;
container[0] = 17;
container[1] = 33;
@@ -71,7 +71,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
TS_ASSERT( container.empty() );
}
- void test_lookup(void) {
+ void test_lookup() {
Common::HashMap<int, int> container;
container[0] = 17;
container[1] = -1;
@@ -86,7 +86,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS( container[4], 96 );
}
- void test_iterator_begin_end(void) {
+ void test_iterator_begin_end() {
Common::HashMap<int, int> container;
// The container is initially empty ...
@@ -101,7 +101,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
TS_ASSERT( container.begin() == container.end() );
}
- void test_hash_map_copy(void) {
+ void test_hash_map_copy() {
Common::HashMap<int, int> map1, container2;
map1[323] = 32;
container2 = map1;
diff --git a/test/common/list.h b/test/common/list.h
index 75a961a604..ef00a0d2a9 100644
--- a/test/common/list.h
+++ b/test/common/list.h
@@ -5,8 +5,7 @@
class ListTestSuite : public CxxTest::TestSuite
{
public:
- void test_empty_clear( void )
- {
+ void test_empty_clear() {
Common::List<int> container;
TS_ASSERT( container.empty() );
container.push_back(17);
@@ -17,20 +16,18 @@ class ListTestSuite : public CxxTest::TestSuite
}
public:
- void test_size( void )
- {
+ void test_size() {
Common::List<int> container;
- TS_ASSERT( container.size() == 0 );
+ TS_ASSERT_EQUALS( container.size(), 0 );
container.push_back(17);
- TS_ASSERT( container.size() == 1 );
+ TS_ASSERT_EQUALS( container.size(), 1 );
container.push_back(33);
- TS_ASSERT( container.size() == 2 );
+ TS_ASSERT_EQUALS( container.size(), 2 );
container.clear();
- TS_ASSERT( container.size() == 0 );
+ TS_ASSERT_EQUALS( container.size(), 0 );
}
- void test_iterator_begin_end( void )
- {
+ void test_iterator_begin_end() {
Common::List<int> container;
// The container is initially empty ...
@@ -45,8 +42,7 @@ class ListTestSuite : public CxxTest::TestSuite
TS_ASSERT( container.begin() == container.end() );
}
- void test_iterator( void )
- {
+ void test_iterator() {
Common::List<int> container;
Common::List<int>::iterator iter;
Common::List<int>::const_iterator cIter;
@@ -64,14 +60,14 @@ class ListTestSuite : public CxxTest::TestSuite
TS_ASSERT( iter == cIter );
- TS_ASSERT( *iter == 17 );
+ TS_ASSERT_EQUALS( *iter, 17 );
++iter;
++cIter;
TS_ASSERT( iter != container.end() );
TS_ASSERT( cIter != container.end() );
TS_ASSERT( iter == cIter );
- TS_ASSERT( *iter == 33 );
+ TS_ASSERT_EQUALS( *iter, 33 );
++iter;
++cIter;
TS_ASSERT( iter != container.end() );
@@ -79,7 +75,7 @@ class ListTestSuite : public CxxTest::TestSuite
TS_ASSERT( iter == cIter );
// Also test the postinc
- TS_ASSERT( *iter == -11 );
+ TS_ASSERT_EQUALS( *iter, -11 );
iter++;
cIter++;
TS_ASSERT( iter == container.end() );
@@ -90,8 +86,7 @@ class ListTestSuite : public CxxTest::TestSuite
TS_ASSERT( iter == cIter );
}
- void test_insert( void )
- {
+ void test_insert() {
Common::List<int> container;
Common::List<int>::iterator iter;
@@ -111,29 +106,28 @@ class ListTestSuite : public CxxTest::TestSuite
iter = container.begin();
- TS_ASSERT( *iter == 17 );
+ TS_ASSERT_EQUALS( *iter, 17 );
++iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 33 );
+ TS_ASSERT_EQUALS( *iter, 33 );
++iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 42 );
+ TS_ASSERT_EQUALS( *iter, 42 );
++iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 43 );
+ TS_ASSERT_EQUALS( *iter, 43 );
++iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == -11 );
+ TS_ASSERT_EQUALS( *iter, -11 );
++iter;
TS_ASSERT( iter == container.end() );
}
- void test_reverse( void )
- {
+ void test_reverse() {
Common::List<int> container;
Common::List<int>::iterator iter;
@@ -146,15 +140,15 @@ class ListTestSuite : public CxxTest::TestSuite
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == -11 );
+ TS_ASSERT_EQUALS( *iter, -11 );
--iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 33 );
+ TS_ASSERT_EQUALS( *iter, 33 );
--iter;
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 17 );
+ TS_ASSERT_EQUALS( *iter, 17 );
--iter;
TS_ASSERT( iter == container.end() );
@@ -162,11 +156,11 @@ class ListTestSuite : public CxxTest::TestSuite
iter = container.reverse_erase(iter);
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 33 );
+ TS_ASSERT_EQUALS( *iter, 33 );
iter = container.reverse_erase(iter);
TS_ASSERT( iter != container.end() );
- TS_ASSERT( *iter == 17 );
+ TS_ASSERT_EQUALS( *iter, 17 );
iter = container.reverse_erase(iter);
TS_ASSERT( iter == container.end() );
diff --git a/test/common/memoryreadstream.h b/test/common/memoryreadstream.h
index 2cec073ad5..dab9b34e0c 100644
--- a/test/common/memoryreadstream.h
+++ b/test/common/memoryreadstream.h
@@ -4,7 +4,7 @@
class MemoryReadStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_seek_set(void) {
+ void test_seek_set() {
byte contents[] = { 'a', 'b', '\n', '\n', 'c', '\n' };
Common::MemoryReadStream ms(contents, sizeof(contents));
@@ -21,7 +21,7 @@ class MemoryReadStreamTestSuite : public CxxTest::TestSuite {
TS_ASSERT(!ms.eos());
}
- void test_seek_cur(void) {
+ void test_seek_cur() {
byte contents[] = { 'a', 'b', '\n', '\n', 'c' };
Common::MemoryReadStream ms(contents, sizeof(contents));
@@ -42,7 +42,7 @@ class MemoryReadStreamTestSuite : public CxxTest::TestSuite {
TS_ASSERT(!ms.eos());
}
- void test_seek_end(void) {
+ void test_seek_end() {
byte contents[] = { 'a', 'b', '\n', '\n', 'c' };
Common::MemoryReadStream ms(contents, sizeof(contents));
diff --git a/test/common/pack.h b/test/common/pack.h
index 6d18c9c300..e2c4fb79a2 100644
--- a/test/common/pack.h
+++ b/test/common/pack.h
@@ -20,13 +20,11 @@ struct TestStruct {
class PackTestSuite : public CxxTest::TestSuite
{
public:
- void test_packing( void )
- {
+ void test_packing() {
TS_ASSERT_EQUALS( sizeof(TestStruct), size_t(4+1+2+4+1) );
}
- void test_offsets( void )
- {
+ void test_offsets() {
TS_ASSERT_EQUALS( OFFS(TestStruct, x), (ptrdiff_t)0 );
TS_ASSERT_EQUALS( OFFS(TestStruct, y), (ptrdiff_t)4 );
TS_ASSERT_EQUALS( OFFS(TestStruct, z), (ptrdiff_t)5 );
diff --git a/test/common/rect.h b/test/common/rect.h
index ee709de482..7b68a3b844 100644
--- a/test/common/rect.h
+++ b/test/common/rect.h
@@ -5,8 +5,7 @@
class RectTestSuite : public CxxTest::TestSuite
{
public:
- void test_point_sqrDist( void )
- {
+ void test_point_sqrDist() {
Common::Point p0;
Common::Point p11(1, 1);
Common::Point p21(2, 1);
@@ -19,15 +18,13 @@ class RectTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS( p11.sqrDist(p23), (uint) 5 );
}
- void test_intersects( void )
- {
+ void test_intersects() {
TS_ASSERT( Common::Rect(0, 0, 2, 2).intersects(Common::Rect(0, 0, 1, 1)) );
TS_ASSERT( Common::Rect(0, 0, 2, 2).intersects(Common::Rect(1, 1, 2, 2)) );
TS_ASSERT( !Common::Rect(0, 0, 1, 1).intersects(Common::Rect(1, 1, 2, 2)) );
}
- void test_contains( void )
- {
+ void test_contains() {
Common::Rect r0;
Common::Rect r1(0, 0, 1, 1);
Common::Rect r2(0, 0, 2, 2);
@@ -44,8 +41,7 @@ class RectTestSuite : public CxxTest::TestSuite
TS_ASSERT( r2.contains(r2) );
}
- void test_extend( void )
- {
+ void test_extend() {
Common::Rect r0;
Common::Rect r1(0, 0, 1, 1);
Common::Rect r2(0, 0, 2, 2);
diff --git a/test/common/seekablesubreadstream.h b/test/common/seekablesubreadstream.h
index 354e2dd5c1..7c3a3249c4 100644
--- a/test/common/seekablesubreadstream.h
+++ b/test/common/seekablesubreadstream.h
@@ -4,7 +4,7 @@
class SeekableSubReadStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_traverse(void) {
+ void test_traverse() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);
@@ -28,7 +28,7 @@ class SeekableSubReadStreamTestSuite : public CxxTest::TestSuite {
TS_ASSERT( ssrs.eos() );
}
- void test_seek(void) {
+ void test_seek() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);
diff --git a/test/common/str.h b/test/common/str.h
index c352bd1887..62b30cb229 100644
--- a/test/common/str.h
+++ b/test/common/str.h
@@ -5,7 +5,7 @@
class StringTestSuite : public CxxTest::TestSuite
{
public:
- void test_constructors(void) {
+ void test_constructors() {
Common::String str("test-string");
TS_ASSERT( str == "test-string");
str = Common::String(str.c_str()+5, 3);
@@ -16,7 +16,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT( str == "str");
}
- void test_trim(void) {
+ void test_trim() {
Common::String str(" This is a s tring with spaces ");
Common::String str2 = str;
str.trim();
@@ -24,14 +24,14 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT( str2 == " This is a s tring with spaces ");
}
- void test_empty_clear(void) {
+ void test_empty_clear() {
Common::String str("test");
TS_ASSERT( !str.empty());
str.clear();
TS_ASSERT( str.empty());
}
- void test_lastChar(void) {
+ void test_lastChar() {
Common::String str;
TS_ASSERT_EQUALS(str.lastChar(), '\0');
str = "test";
@@ -40,7 +40,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str2.lastChar(), 'r');
}
- void test_concat1(void) {
+ void test_concat1() {
Common::String str("foo");
Common::String str2("bar");
str += str2;
@@ -48,19 +48,19 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str2, "bar");
}
- void test_concat2(void) {
+ void test_concat2() {
Common::String str("foo");
str += "bar";
TS_ASSERT_EQUALS(str, "foobar");
}
- void test_concat3(void) {
+ void test_concat3() {
Common::String str("foo");
str += 'X';
TS_ASSERT_EQUALS(str, "fooX");
}
- void test_refCount(void) {
+ void test_refCount() {
// using internal storage
Common::String foo1("foo");
Common::String foo2(foo1);
@@ -75,7 +75,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(foo3, "foo""X");
}
- void test_refCount2(void) {
+ void test_refCount2() {
// using external storage
Common::String foo1("fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd");
Common::String foo2(foo1);
@@ -90,7 +90,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(foo3, "fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd""X");
}
- void test_refCount3(void) {
+ void test_refCount3() {
Common::String foo1("0123456789abcdefghijk");
Common::String foo2(foo1);
Common::String foo3(foo2);
@@ -104,7 +104,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(foo3, "0123456789abcdefghijk""0123456789abcdefghijk");
}
- void test_refCount4(void) {
+ void test_refCount4() {
Common::String foo1("fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd");
Common::String foo2(foo1);
Common::String foo3(foo2);
@@ -118,7 +118,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(foo3, "fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd""fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd");
}
- void test_hasPrefix(void) {
+ void test_hasPrefix() {
Common::String str("this/is/a/test, haha");
TS_ASSERT_EQUALS(str.hasPrefix(""), true);
TS_ASSERT_EQUALS(str.hasPrefix("this"), true);
@@ -126,7 +126,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str.hasPrefix("foo"), false);
}
- void test_hasSuffix(void) {
+ void test_hasSuffix() {
Common::String str("this/is/a/test, haha");
TS_ASSERT_EQUALS(str.hasSuffix(""), true);
TS_ASSERT_EQUALS(str.hasSuffix("haha"), true);
@@ -134,7 +134,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str.hasSuffix("hahah"), false);
}
- void test_contains(void) {
+ void test_contains() {
Common::String str("this/is/a/test, haha");
TS_ASSERT_EQUALS(str.contains(""), true);
TS_ASSERT_EQUALS(str.contains("haha"), true);
@@ -142,7 +142,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str.contains("test"), true);
}
- void test_toLowercase(void) {
+ void test_toLowercase() {
Common::String str("Test it, NOW! 42");
Common::String str2 = str;
str.toLowercase();
@@ -150,7 +150,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str2, "Test it, NOW! 42");
}
- void test_toUppercase(void) {
+ void test_toUppercase() {
Common::String str("Test it, NOW! 42");
Common::String str2 = str;
str.toUppercase();
@@ -158,8 +158,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(str2, "Test it, NOW! 42");
}
- void test_deleteChar( void )
- {
+ void test_deleteChar() {
Common::String str("01234567890123456789012345678901");
str.deleteChar(10);
TS_ASSERT_EQUALS( str, "0123456789123456789012345678901" );
@@ -167,8 +166,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS( str, "012345678923456789012345678901" );
}
- void test_sharing( void )
- {
+ void test_sharing() {
Common::String str("01234567890123456789012345678901");
Common::String str2(str);
TS_ASSERT_EQUALS( str2, "01234567890123456789012345678901" );
@@ -177,7 +175,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS( str2, "01234567890123456789012345678901" );
}
- void test_lastPathComponent(void) {
+ void test_lastPathComponent() {
TS_ASSERT(Common::lastPathComponent("/", '/') == "");
TS_ASSERT(Common::lastPathComponent("/foo/bar", '/') == "bar");
TS_ASSERT(Common::lastPathComponent("/foo//bar/", '/') == "bar");
@@ -193,7 +191,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT(Common::lastPathComponent("foo//.bar//", '/') == ".bar");
}
- void test_normalizePath(void) {
+ void test_normalizePath() {
TS_ASSERT(Common::normalizePath("/", '/') == "/");
TS_ASSERT(Common::normalizePath("/foo/bar", '/') == "/foo/bar");
TS_ASSERT(Common::normalizePath("/foo//bar/", '/') == "/foo/bar");
@@ -209,7 +207,7 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT(Common::normalizePath("foo//.bar//", '/') == "foo/.bar");
}
- void test_matchString(void) {
+ void test_matchString() {
TS_ASSERT( Common::matchString("", "*"));
TS_ASSERT( Common::matchString("a", "*"));
TS_ASSERT( Common::matchString("monkey.s01", "*"));
diff --git a/test/common/stream.h b/test/common/stream.h
index 4d332b8925..4e0d608920 100644
--- a/test/common/stream.h
+++ b/test/common/stream.h
@@ -4,7 +4,7 @@
class ReadLineStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_readline(void) {
+ void test_readline() {
byte contents[] = { 'a', 'b', '\n', '\n', 'c', '\n' };
Common::MemoryReadStream ms(contents, sizeof(contents));
@@ -26,7 +26,7 @@ class ReadLineStreamTestSuite : public CxxTest::TestSuite {
TS_ASSERT(ms.eos());
}
- void test_readline2(void) {
+ void test_readline2() {
byte contents[] = { 'a', 'b', '\n', '\n', 'c' };
Common::MemoryReadStream ms(contents, sizeof(contents));
diff --git a/test/common/subreadstream.h b/test/common/subreadstream.h
index 2ac453576a..f68a9860a5 100644
--- a/test/common/subreadstream.h
+++ b/test/common/subreadstream.h
@@ -4,7 +4,7 @@
class SubReadStreamTestSuite : public CxxTest::TestSuite {
public:
- void test_traverse(void) {
+ void test_traverse() {
byte contents[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Common::MemoryReadStream ms(contents, 10);