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); }
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); }
IUTEST(SyntaxTest, StrEq) { const char test[] = "test"; if( const char* p = "test" ) IUTEST_ASSERT_STREQ(p, test) << p; if( const char* p = "test" ) IUTEST_EXPECT_STREQ(p, test) << p; if( const char* p = "test" ) IUTEST_INFORM_STREQ(p, test) << p; if( const char* p = "test" ) IUTEST_ASSUME_STREQ(p, test) << p; }
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); }