#include "../include/iutest.hpp"
#if IUTEST_HAS_PRINT_TO
struct Bar
{
int x, y, z;
bool operator == (const Bar& rhs) const
{
return x == rhs.x && y == rhs.y && z == rhs.z;
}
};
::iutest::iu_ostream& operator << (::iutest::iu_ostream& os, const Bar& bar)
{
return os << "X:" << bar.x << " Y:" << bar.y << " Z:" << bar.z;
}
void PrintTo(const Bar& bar, ::iutest::iu_ostream* os)
{
*os << "x:" << bar.x << " y:" << bar.y << " z:" << bar.z;
}
{
::std::vector<int> a;
for( int i = 0; i < 10; ++i )
{
a.push_back(i);
}
int* pi=NULL;
void* p=NULL;
Bar bar = {0, 1, 2};
}
{
Bar bar1 = {0, 1, 2};
Bar bar2 = {0, 1, 2};
}
{
{
unsigned char a[3] = {0, 1, 2};
const unsigned char b[3] = {0, 1, 2};
const volatile unsigned char c[3] = {0, 1, 2};
volatile unsigned char d[3] = {0, 1, 2};
}
{
char a[3] = {0, 1, 2};
const char b[3] = {0, 1, 2};
const volatile char c[3] = {0, 1, 2};
volatile char d[3] = {0, 1, 2};
}
}
#if IUTEST_HAS_TYPED_TEST
template<typename T>
typedef ::iutest::Types<char, unsigned char
, short, unsigned short
, int, unsigned int
, long, unsigned long
, int*> PrintStringTestTypes;
{
TypeParam a = 0;
TypeParam& b = a;
const TypeParam c = a;
const volatile TypeParam d = a;
}
#if IUTEST_HAS_CHAR16_T
IUTEST(PrintToTest, U16String)
{
}
#endif
#if IUTEST_HAS_CHAR32_T
IUTEST(PrintToTest, U32String)
{
}
#endif
#endif
#endif