コード例 #1
0
ファイル: typed_test_tests.cpp プロジェクト: srz-zumix/iutest
IUTEST_TYPED_TEST(MultiTypedTest, Get)
{
    typedef typename TypeParam:: template get<0>::type  Type1;
    typedef typename TypeParam:: template get<1>::type  Type2;

#if IUTEST_HAS_STATIC_ASSERT_TYPEEQ
    ::iutest::StaticAssertTypeEq< Type1, int >();
#endif
    IUTEST_SUCCEED() << ::iutest::detail::GetTypeName< Type1 >();
    IUTEST_SUCCEED() << ::iutest::detail::GetTypeName< Type2 >();
}
コード例 #2
0
ファイル: printto.cpp プロジェクト: srz-zumix/iutest
IUTEST_TYPED_TEST(TypedPrintToTest, Print)
{
    TypeParam a = 0;
    TypeParam& b = a;
    const TypeParam c = a;
    const volatile TypeParam d = a;

    IUTEST_SUCCEED() << ::iutest::PrintToString(a);
    IUTEST_SUCCEED() << ::iutest::PrintToString(b);
    IUTEST_SUCCEED() << ::iutest::PrintToString(c);
    IUTEST_SUCCEED() << ::iutest::PrintToString(d);
}
コード例 #3
0
ファイル: printto.cpp プロジェクト: srz-zumix/iutest
IUTEST(PrintToTest, RawArray)
{
    {
        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};

        IUTEST_SUCCEED() << ::iutest::PrintToString(a);
        IUTEST_SUCCEED() << ::iutest::PrintToString(b);
        IUTEST_SUCCEED() << ::iutest::PrintToString(c);
        IUTEST_SUCCEED() << ::iutest::PrintToString(d);
    }
    {
        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};

        IUTEST_SUCCEED() << ::iutest::PrintToString(a);
        IUTEST_SUCCEED() << ::iutest::PrintToString(b);
        IUTEST_SUCCEED() << ::iutest::PrintToString(c);
        IUTEST_SUCCEED() << ::iutest::PrintToString(d);
    }
}
コード例 #4
0
ファイル: printto.cpp プロジェクト: srz-zumix/iutest
IUTEST(PrintToTest, Test1)
{
    ::std::vector<int> a;
    for( int i=0; i < 10; ++i )
        a.push_back(i);
    IUTEST_SUCCEED() << ::iutest::PrintToString(a);

    int* pi=NULL;
    void* p=NULL;
    IUTEST_SUCCEED() << ::iutest::PrintToString(p);
    IUTEST_SUCCEED() << ::iutest::PrintToString(pi);

    Bar bar = {0, 1, 2};
    IUTEST_SUCCEED() << ::iutest::PrintToString(bar);
}
コード例 #5
0
IUTEST(PrintToTest, U32String)
{
    IUTEST_SUCCEED() << ::iutest::PrintToString(U"テスト");
}
コード例 #6
0
IUTEST_P(ParamDirectTest, Test)
{
    IUTEST_SUCCEED() << GetParam();
}
コード例 #7
0
IUTEST(Foo, Ok)
{
    IUTEST_SUCCEED() << "not show.";
}