Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Aug 28, 2020
1 parent 97fc6b4 commit 6263608
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
2 changes: 2 additions & 0 deletions include/iutest_typed_tests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
#endif

#define IIUT_TYPED_TEST_I(classname_, testsuite_, testsuitename_, testname_) \
IUTEST_STATIC_ASSERT_MSG(sizeof(IUTEST_PP_TOSTRING(testsuite_)) > 1, "testsuite_ must not be empty"); \
IUTEST_STATIC_ASSERT_MSG(sizeof(IUTEST_PP_TOSTRING(testname_)) > 1, "testname_ must not be empty"); \
template<typename iutest_TypeParam> class classname_ : public testsuite_<iutest_TypeParam> { \
typedef testsuite_<iutest_TypeParam> TestFixture; \
typedef iutest_TypeParam TypeParam; \
Expand Down
23 changes: 23 additions & 0 deletions test/empty_testname_failure_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,29 @@ IUTEST_F(, Test)

}

#if IUTEST_HAS_TYPED_TEST

namespace emptyname
{

IUTEST_TEST_STATICASSERT("testname_ must not be empty")
IUTEST_TYPED_TEST(TypedTest, )
{
}

}

namespace emptysuite
{

IUTEST_TEST_STATICASSERT("testsuite_ must not be empty")
IUTEST_TYPED_TEST(, Test)
{
}

}
#endif

#if IUTEST_HAS_TYPED_TEST_P

template<typename T>
Expand Down
24 changes: 0 additions & 24 deletions test/empty_testname_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,6 @@ IUTEST_INSTANTIATE_TEST_SUITE_P(A, ParamTestAlias, ::iutest::Values(0, 1));

#endif

#if IUTEST_HAS_TYPED_TEST

template<typename T>
class TypedTest : public ::iutest::Test {};

typedef ::iutest::Types<int, float> TypedTestTypes;
IUTEST_TYPED_TEST_SUITE(TypedTest, TypedTestTypes);

IUTEST_TYPED_TEST(TypedTest, )
{
}

#if IUTEST_HAS_TESTFIXTURE_ALIAS_BY_TUPLE
template<typename T>
class TypedTest2 : public ::iutest::Test {};
#define TypedTestAlias (, TypedTest2)
IUTEST_TYPED_TEST_SUITE(TypedTestAlias, TypedTestTypes);
IUTEST_TYPED_TEST(TypedTestAlias, )
{
}
#endif

#endif

#if IUTEST_HAS_ANY_PARAM_TEST

IUTEST_AP(AnyParamTest, )
Expand Down

0 comments on commit 6263608

Please sign in to comment.