aboutsummaryrefslogtreecommitdiff
path: root/test/cxxtest/sample/MessageTest.h
diff options
context:
space:
mode:
authorMax Horn2006-03-29 10:25:48 +0000
committerMax Horn2006-03-29 10:25:48 +0000
commit3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch)
treedf3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/sample/MessageTest.h
parent9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff)
downloadscummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz
scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2
scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/sample/MessageTest.h')
-rw-r--r--test/cxxtest/sample/MessageTest.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/cxxtest/sample/MessageTest.h b/test/cxxtest/sample/MessageTest.h
new file mode 100644
index 0000000000..621289f78d
--- /dev/null
+++ b/test/cxxtest/sample/MessageTest.h
@@ -0,0 +1,30 @@
+#ifndef __MESSAGETEST_H
+#define __MESSAGETEST_H
+
+#include <cxxtest/TestSuite.h>
+
+//
+// The [E]TSM_ macros can be used to print a specified message
+// instead of the default one.
+// This is useful when you refactor your tests, as shown below
+//
+
+class MessageTest : public CxxTest::TestSuite
+{
+public:
+ void testValues()
+ {
+ checkValue( 0, "My hovercraft" );
+ checkValue( 1, "is full" );
+ checkValue( 2, "of eels" );
+ }
+
+ void checkValue( unsigned value, const char *message )
+ {
+ TSM_ASSERT( message, value != 0 );
+ TSM_ASSERT_EQUALS( message, value, value * value );
+ }
+};
+
+
+#endif // __MESSAGETEST_H