Skip to content

Commit

Permalink
ENH: Remove legacy designation for outdated defines
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmjohnson committed Jun 6, 2024
1 parent 0f8b7e7 commit 207e332
Showing 1 changed file with 13 additions and 40 deletions.
53 changes: 13 additions & 40 deletions Modules/Core/TestKernel/include/itkTestingMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,47 +35,20 @@ namespace itk
// DEPRECATED: These macros are left here for compatibility.
// In the future, they will be removed in favor of the "ITK_" prefixed
// versions.
#if defined(ITK_FUTURE_LEGACY_REMOVE)
#define EXERCISE_BASIC_OBJECT_METHODS \
static_assert(false, "Replace EXERCISE_BASIC_OBJECT_METHODS with ITK_EXERCISE_BASIC_OBJECT_METHODS")
#define TRY_EXPECT_EXCEPTION static_assert(false, "Replace TRY_EXPECT_EXCEPTION with ITK_TRY_EXPECT_EXCEPTION")
#define TRY_EXPECT_NO_EXCEPTION static_assert(fasle, "Replace TRY_EXPECT_NO_EXCEPTION with ITK_TRY_EXPECT_NO_EXCEPTION")
#define TEST_EXPECT_TRUE_STATUS_VALUE \
static_assert(false, "Replace TEST_EXPECT_TRUE_STATUS_VALUE with ITK_TEST_EXPECT_TRUE_STATUS_VALUE")
#define TEST_EXPECT_TRUE static_assert(false, "Replace TEST_EXPECT_TRUE with ITK_TEST_EXPECT_TRUE")
#define TEST_EXPECT_EQUAL_STATUS_VALUE "Replace TEST_EXPECT_EQUAL_STATUS_VALUE with ITK_TEST_EXPECT_EQUAL_STATUS_VALUE"
#define TEST_EXPECT_EQUAL static_assert(false, "Replace TEST_EXPECT_EQUAL with ITK_TEST_EXPECT_EQUAL")
#define TEST_SET_GET static_assert(false, "Replace TEST_SET_GET with ITK_TEST_SET_GET")
#define TEST_SET_GET_VALUE static_assert(false, "Replace TEST_SET_GET_VALUE with ITK_TEST_SET_GET_VALUE")
#define TEST_SET_GET_NULL_VALUE static_assert(false, "Replace TEST_SET_GET_NULL_VALUE with ITK_TEST_SET_GET_NULL_VALUE")
#define TEST_SET_GET_BOOLEAN static_assert(false, "Replace TEST_SET_GET_BOOLEAN with ITK_TEST_SET_GET_BOOLEAN")

# if defined(__clang__) || defined(__GNUC__)
# pragma GCC poison EXERCISE_BASIC_OBJECT_METHODS
# pragma GCC poison TRY_EXPECT_EXCEPTION
# pragma GCC poison TRY_EXPECT_NO_EXCEPTION
# pragma GCC poison TEST_EXPECT_TRUE_STATUS_VALUE
# pragma GCC poison TEST_EXPECT_TRUE
# pragma GCC poison TEST_EXPECT_EQUAL_STATUS_VALUE
# pragma GCC poison TEST_EXPECT_EQUAL
# pragma GCC poison TEST_SET_GET
# pragma GCC poison TEST_SET_GET_VALUE
# pragma GCC poison TEST_SET_GET_NULL_VALUE
# pragma GCC poison TEST_SET_GET_BOOLEAN
# else
# define EXERCISE_BASIC_OBJECT_METHODS "Replace EXERCISE_BASIC_OBJECT_METHODS with ITK_EXERCISE_BASIC_OBJECT_METHODS"
# define TRY_EXPECT_EXCEPTION "Replace TRY_EXPECT_EXCEPTION with ITK_TRY_EXPECT_EXCEPTION"
# define TRY_EXPECT_NO_EXCEPTION "Replace TRY_EXPECT_NO_EXCEPTION with ITK_TRY_EXPECT_NO_EXCEPTION"
# define TEST_EXPECT_TRUE_STATUS_VALUE "Replace TEST_EXPECT_TRUE_STATUS_VALUE with ITK_TEST_EXPECT_TRUE_STATUS_VALUE"
# define TEST_EXPECT_TRUE "Replace TEST_EXPECT_TRUE with ITK_TEST_EXPECT_TRUE"
# define TEST_EXPECT_EQUAL_STATUS_VALUE \
"Replace TEST_EXPECT_EQUAL_STATUS_VALUE with ITK_TEST_EXPECT_EQUAL_STATUS_VALUE"
# define TEST_EXPECT_EQUAL "Replace TEST_EXPECT_EQUAL with ITK_TEST_EXPECT_EQUAL"
# define TEST_SET_GET "Replace TEST_SET_GET with ITK_TEST_SET_GET"
# define TEST_SET_GET_VALUE "Replace TEST_SET_GET_VALUE with ITK_TEST_SET_GET_VALUE"
# define TEST_SET_GET_NULL_VALUE "Replace TEST_SET_GET_NULL_VALUE with ITK_TEST_SET_GET_NULL_VALUE"
# define TEST_SET_GET_BOOLEAN "Replace TEST_SET_GET_BOOLEAN with ITK_TEST_SET_GET_BOOLEAN"
# endif
#else
# define EXERCISE_BASIC_OBJECT_METHODS ITK_EXERCISE_BASIC_OBJECT_METHODS
# define TRY_EXPECT_EXCEPTION ITK_TRY_EXPECT_EXCEPTION
# define TRY_EXPECT_NO_EXCEPTION ITK_TRY_EXPECT_NO_EXCEPTION
# define TEST_EXPECT_TRUE_STATUS_VALUE ITK_TEST_EXPECT_TRUE_STATUS_VALUE
# define TEST_EXPECT_TRUE ITK_TEST_EXPECT_TRUE
# define TEST_EXPECT_EQUAL_STATUS_VALUE ITK_TEST_EXPECT_EQUAL_STATUS_VALUE
# define TEST_EXPECT_EQUAL ITK_TEST_EXPECT_EQUAL
# define TEST_SET_GET ITK_TEST_SET_GET
# define TEST_SET_GET_VALUE ITK_TEST_SET_GET_VALUE
# define TEST_SET_GET_NULL_VALUE ITK_TEST_SET_GET_NULL_VALUE
# define TEST_SET_GET_BOOLEAN ITK_TEST_SET_GET_BOOLEAN
#endif

/* clang-format off */
#if defined(__GNUC__)
Expand Down

0 comments on commit 207e332

Please sign in to comment.