haiku/headers/tools/cppunit/TestUtils.h
Tyler Dauwalder a6b33ea3de + Moved BAutolock and BArchivable over to new testing framework.
+ Added ability to specify entire suites to the UnitTester program.
+ BAutolock and BArchivable tests now use CPPUNIT_ASSERT, but BLocker
tests crash for some unknown reason with said assertion, so plain old vanilla
assert() is still used. I'll look into this later.
+ BArchivable tests that try to load a RemoteTestObject are failing
because the resource file doesn't appear to be linked into
libsupporttest_RemoteTestObject.so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-19 06:45:28 +00:00

33 lines
1018 B
C++

#ifndef __beos_test_utils_h__
#define __beos_test_utils_h__
#include <string>
#include <SupportDefs.h>
// Handy defines :-)
#define CHK CPPUNIT_ASSERT
#define RES DecodeResult
// Prints out a description of the given status_t
// return code to standard out. Helpful for figuring
// out just what the R5 libraries are returning.
// Returns the same value passed in, so you can
// use it inline in tests if necessary.
status_t DecodeResult(status_t result);
// Returns a string version of the given integer
std::string IntToStr(int i);
// Calls system() with the concatenated string of command and parameter.
void ExecCommand(const char *command, const char *parameter);
// Calls system() with the concatenated string of command, parameter1,
// " " and parameter2.
void ExecCommand(const char *command, const char *parameter1,
const char *parameter2);
// Calls system() with the given command (kind of silly, but it's consistent :-)
void ExecCommand(const char *command);
#endif // __beos_test_utils_h__