#include "../include/iutest.hpp"
int f()
{
return 42;
}
{
}
IUTEST(AssertionTest, NoFailure)
{
}
{
int x0=0, y0=0, x1=1;
float f0=0.0f, f1=1.0f;
double d0=0.0, d1=1.0;
{
}
{
int* zero=NULL;
::std::vector<int> v1, v2;
}
{
int* one=reinterpret_cast<int*>(1);
}
{
}
{
}
{
}
{
}
}
{
{
int* p1 = NULL;
void* p2 = &p1;
}
{
int v = 0;
int* p1 = &v;
}
{
int aa[] ={ 0, 1, 2, 3, 4 };
int ab[] ={ 0, 1, 2, 3, 4 };
#if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#endif
}
{
int aa[] ={ 0, 1, 2, 3, 4 };
int ab[] ={ 9, 1, 2, 3, 4 };
#if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#endif
}
}
#if !defined(IUTEST_USE_GTEST)
#if IUTEST_HAS_ASSERTION_NOEQUALTO_OBJECT
struct TestObjectX
{
int a, b, c;
};
IUTEST(AssertionTest, MemCmpEQ)
{
TestObjectX x={ 0, 1, 2 };
TestObjectX y={ 0, 1, 2 };
}
#endif
#endif
{
#if IUTEST_HAS_CHAR16_T
const char16_t c16[] = u"test";
#endif
#if IUTEST_HAS_CHAR32_T
const char32_t c32[] = U"test";
#endif
}
{
const char mbs[] = "test";
const wchar_t wcs[] = L"test";
{
::std::string str1 = "test";
}
{
::std::string str1 = "tEst";
::std::string str2 = "teSt";
::std::string str3 = "hoSt";
}
}
#if defined(IUTEST_OS_WINDOWS)
IUTEST(AssertionTest, HResult)
{
IUTEST_EXPECT_HRESULT_SUCCEEDED(0);
IUTEST_EXPECT_HRESULT_FAILED(-1);
}
#endif
static bool IsOdd(int val)
{
return (val & 1) != 0;
}
static bool IsGreater(int a, int b)
{
return a > b;
}
static bool PredTest3(int , int , int )
{
return true;
}
static bool PredTest4(int , int , int , int )
{
return true;
}
static bool PredTest5(int , int , int , int , int )
{
return true;
}
{
}
#if IUTEST_HAS_STATIC_ASSERT_TYPEEQ
{
}
#endif
#if IUTEST_HAS_REGEX
{
const char test [] = "te0123st";
IUTEST_ASSERT_MATCHES_REGEXEQ("te[0-9]*st", test);
}
#endif
IUTEST(DISABLED_TestFailure, Expression)
{
}
IUTEST(DISABLED_TestFailure, EQ)
{
}
IUTEST(DISABLED_TestFailure, NE)
{
int x=1, y=1;
}
IUTEST(DISABLED_TestFailure, GE)
{
float a = 0.1f, b = 1.0f;
}
IUTEST(DISABLED_TestFailure, TRUE)
{
}
IUTEST(DISABLED_TestFailure, FALSE)
{
}
IUTEST(DISABLED_TestFailure, Fail)
{
}
#if defined(IUTEST_OS_WINDOWS)
IUTEST(DISABLED_TestFailure, HRESULT)
{
IUTEST_ASSERT_HRESULT_SUCCEEDED(E_OUTOFMEMORY);
}
#endif
void AssertFunc()
{
}
IUTEST(DISABLED_TestFailure, NoFailure)
{
}
IUTEST(DISABLED_TestFailure, Pred)
{
int x=4, y=5;
}
IUTEST(DISABLED_TestFailure, Mix)
{
{
::std::string str1 = "test";
::std::string str2 = "text";
}
{
int aa[] = { 0, 1, 2, 3, 4 };
int ab[] = { 0, 1, 2, 3, 4, 5 };
char ac[] = { 0, 0, 2, 3, 5 };
}
}