Пример #1
0
IUTEST_TYPED_TEST(StrTest, String)
{
    typename TestFixture::String test1 = TestFixture::Text::test;
    typename TestFixture::String test2 = TestFixture::Text::test;
    IUTEST_ASSERT_STREQ(test1, TestFixture::Text::test);
    IUTEST_EXPECT_STREQ(test1, TestFixture::Text::test);
    IUTEST_INFORM_STREQ(test1, TestFixture::Text::test);
    IUTEST_ASSERT_STREQ(test1, test2);
    IUTEST_EXPECT_STREQ(test1, test2);
    IUTEST_INFORM_STREQ(test1, test2);
    IUTEST_ASSERT_STREQ(TestFixture::Text::test, test2);
    IUTEST_EXPECT_STREQ(TestFixture::Text::test, test2);
    IUTEST_INFORM_STREQ(TestFixture::Text::test, test2);

    typename TestFixture::String Test = TestFixture::Text::Test;
    IUTEST_ASSERT_STRNE(test1, Test);
    IUTEST_EXPECT_STRNE(test1, Test);
    IUTEST_INFORM_STRNE(test1, Test);
    IUTEST_ASSERT_STRNE(TestFixture::Text::test, Test);
    IUTEST_EXPECT_STRNE(TestFixture::Text::test, Test);
    IUTEST_INFORM_STRNE(TestFixture::Text::test, Test);
    IUTEST_ASSERT_STRNE(test1, TestFixture::Text::Test);
    IUTEST_EXPECT_STRNE(test1, TestFixture::Text::Test);
    IUTEST_INFORM_STRNE(test1, TestFixture::Text::Test);
}
Пример #2
0
IUTEST_TYPED_TEST(StrTest, Null)
{
    TypeParam* p=NULL;
    IUTEST_ASSERT_STREQ(NULL, p);
    IUTEST_EXPECT_STREQ(NULL, p);
    IUTEST_INFORM_STREQ(NULL, p);

    IUTEST_ASSERT_STRNE(TestFixture::Text::test, NULL);
    IUTEST_EXPECT_STRNE(TestFixture::Text::test, NULL);
    IUTEST_INFORM_STRNE(TestFixture::Text::test, NULL);

    IUTEST_ASSERT_STRNE(NULL, TestFixture::Text::test);
    IUTEST_EXPECT_STRNE(NULL, TestFixture::Text::test);
    IUTEST_INFORM_STRNE(NULL, TestFixture::Text::test);
}
Пример #3
0
IUTEST_TYPED_TEST(StrTest, Raw)
{
    const TypeParam* p = TestFixture::Text::test;
    IUTEST_ASSERT_STREQ(TestFixture::Text::test, p);
    IUTEST_EXPECT_STREQ(TestFixture::Text::test, p);
    IUTEST_INFORM_STREQ(TestFixture::Text::test, p);

    IUTEST_ASSERT_STRNE(TestFixture::Text::Test, p);
    IUTEST_EXPECT_STRNE(TestFixture::Text::Test, p);
    IUTEST_INFORM_STRNE(TestFixture::Text::Test, p);
}
Пример #4
0
IUTEST(SyntaxTest, StrNe)
{
    const char test[] = "Test";
    if( const char* p = "test" )
        IUTEST_ASSERT_STRNE(p, test) << p;
    if( const char* p = "test" )
        IUTEST_EXPECT_STRNE(p, test) << p;
    if( const char* p = "test" )
        IUTEST_INFORM_STRNE(p, test) << p;
    if( const char* p = "test" )
        IUTEST_ASSUME_STRNE(p, test) << p;
}