32 lines
433 B
C++
32 lines
433 B
C++
#include <cxxtest/ValueTraits.h>
|
|
|
|
#include <cstdio>
|
|
#include <string>
|
|
|
|
#include "point3d.hh"
|
|
|
|
namespace CxxTest
|
|
{
|
|
|
|
CXXTEST_TEMPLATE_INSTANTIATION
|
|
|
|
class ValueTraits<Point3D>
|
|
{
|
|
private:
|
|
char text_value[50] ;
|
|
|
|
public:
|
|
ValueTraits(const Point3D &source)
|
|
{
|
|
sprintf(text_value, "Point3D%s",
|
|
static_cast<std::string>(source).c_str()) ;
|
|
}
|
|
|
|
const char* asString(void) const
|
|
{
|
|
return text_value ;
|
|
}
|
|
} ;
|
|
|
|
} ;
|