Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Functions
self_test.h File Reference
#include "lib/status.h"
#include "lib/os_path.h"
#include "lib/posix/posix.h"
#include <cxxtest/StdValueTraits.h>
#include <cxxtest/TestSuite.h>
#include "ps/CStr.h"
#include "maths/FixedVector3D.h"
#include "maths/Vector3D.h"

Go to the source code of this file.

Classes

class  CxxTest::ValueTraits< const CStr8 >
 
class  CxxTest::ValueTraits< const CStrW >
 
class  CxxTest::ValueTraits< CFixedVector3D >
 
class  CxxTest::ValueTraits< CVector3D >
 

Namespaces

 CxxTest
 

Macros

#define CXXTEST_HAVE_EH
 
#define CXXTEST_HAVE_STD
 
#define TS_ASSERT_OK(expr)   TS_ASSERT_EQUALS((expr), INFO::OK)
 
#define TSM_ASSERT_OK(m, expr)   TSM_ASSERT_EQUALS(m, (expr), INFO::OK)
 
#define TS_ASSERT_STR_EQUALS(str1, str2)   TS_ASSERT_EQUALS(std::string(str1), std::string(str2))
 
#define TSM_ASSERT_STR_EQUALS(m, str1, str2)   TSM_ASSERT_EQUALS(m, std::string(str1), std::string(str2))
 
#define TS_ASSERT_WSTR_EQUALS(str1, str2)   TS_ASSERT_EQUALS(std::wstring(str1), std::wstring(str2))
 
#define TSM_ASSERT_WSTR_EQUALS(m, str1, str2)   TSM_ASSERT_EQUALS(m, std::wstring(str1), std::wstring(str2))
 
#define TS_ASSERT_PATH_EQUALS(path1, path2)   TS_ASSERT_EQUALS((path1).string(), (path2).string())
 
#define TSM_ASSERT_PATH_EQUALS(m, path1, path2)   TSM_ASSERT_EQUALS(m, (path1).string(), (path2).string())
 
#define TS_ASSERT_WSTR_CONTAINS(str1, str2)   TSM_ASSERT(str1, ts_str_contains(str1, str2))
 
#define TS_ASSERT_WSTR_NOT_CONTAINS(str1, str2)   TSM_ASSERT(str1, !ts_str_contains(str1, str2))
 
#define TS_ASSERT_VECTOR_EQUALS_ARRAY(vec1, array)   TS_ASSERT_EQUALS(vec1, ts_make_vector((array), sizeof(array)))
 
#define TS_ASSERT_VECTOR_CONTAINS(vec1, element)   TS_ASSERT(std::find((vec1).begin(), (vec1).end(), element) != (vec1).end());
 

Functions

 CxxTest::CXXTEST_COPY_CONST_TRAITS (CStr8)
 
 CxxTest::CXXTEST_COPY_CONST_TRAITS (CStrW)
 
bool ts_str_contains (const std::wstring &str1, const std::wstring &str2)
 
template<typename T >
std::vector< Tts_make_vector (T *start, size_t size_bytes)
 
void ScriptTestSetup (ScriptInterface &)
 
OsPath DataDir ()
 

Macro Definition Documentation

#define CXXTEST_HAVE_EH

Definition at line 189 of file self_test.h.

#define CXXTEST_HAVE_STD

Definition at line 190 of file self_test.h.

#define TS_ASSERT_OK (   expr)    TS_ASSERT_EQUALS((expr), INFO::OK)

Definition at line 263 of file self_test.h.

#define TS_ASSERT_PATH_EQUALS (   path1,
  path2 
)    TS_ASSERT_EQUALS((path1).string(), (path2).string())

Definition at line 269 of file self_test.h.

#define TS_ASSERT_STR_EQUALS (   str1,
  str2 
)    TS_ASSERT_EQUALS(std::string(str1), std::string(str2))

Definition at line 265 of file self_test.h.

#define TS_ASSERT_VECTOR_CONTAINS (   vec1,
  element 
)    TS_ASSERT(std::find((vec1).begin(), (vec1).end(), element) != (vec1).end());

Definition at line 282 of file self_test.h.

#define TS_ASSERT_VECTOR_EQUALS_ARRAY (   vec1,
  array 
)    TS_ASSERT_EQUALS(vec1, ts_make_vector((array), sizeof(array)))

Definition at line 281 of file self_test.h.

#define TS_ASSERT_WSTR_CONTAINS (   str1,
  str2 
)    TSM_ASSERT(str1, ts_str_contains(str1, str2))

Definition at line 273 of file self_test.h.

#define TS_ASSERT_WSTR_EQUALS (   str1,
  str2 
)    TS_ASSERT_EQUALS(std::wstring(str1), std::wstring(str2))

Definition at line 267 of file self_test.h.

#define TS_ASSERT_WSTR_NOT_CONTAINS (   str1,
  str2 
)    TSM_ASSERT(str1, !ts_str_contains(str1, str2))

Definition at line 274 of file self_test.h.

#define TSM_ASSERT_OK (   m,
  expr 
)    TSM_ASSERT_EQUALS(m, (expr), INFO::OK)

Definition at line 264 of file self_test.h.

#define TSM_ASSERT_PATH_EQUALS (   m,
  path1,
  path2 
)    TSM_ASSERT_EQUALS(m, (path1).string(), (path2).string())

Definition at line 270 of file self_test.h.

#define TSM_ASSERT_STR_EQUALS (   m,
  str1,
  str2 
)    TSM_ASSERT_EQUALS(m, std::string(str1), std::string(str2))

Definition at line 266 of file self_test.h.

#define TSM_ASSERT_WSTR_EQUALS (   m,
  str1,
  str2 
)    TSM_ASSERT_EQUALS(m, std::wstring(str1), std::wstring(str2))

Definition at line 268 of file self_test.h.

Function Documentation

OsPath DataDir ( )

Definition at line 110 of file test_setup.cpp.

void ScriptTestSetup ( ScriptInterface )

Definition at line 125 of file test_setup.cpp.

template<typename T >
std::vector<T> ts_make_vector ( T start,
size_t  size_bytes 
)

Definition at line 277 of file self_test.h.

bool ts_str_contains ( const std::wstring &  str1,
const std::wstring &  str2 
)

Definition at line 101 of file test_setup.cpp.