ocarina/tests/core/test.h
Anna Schumaker 2276a44a07 tests/core: Update string test to the new framework
I converted the test to the new framework, and I introduced a new
"test.h" file in the source directory to help with mixing C and C++
code.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 08:19:49 -04:00

26 lines
336 B
C++

/*
* Copyright 2015 (c) Anna Schumaker.
*/
#ifndef TESTS_CORE_TESTS_H
#define TESTS_CORE_TESTS_H
extern "C" {
#include <tests/test.h>
}
#include <sstream>
#undef tostring
template <class T>
static inline char *tostring(T s)
{
std::stringstream ss;
ss << s;
return strdup(ss.str().c_str());
}
#endif /* TESTS_CORE_TESTS_H */