Skip to content

Commit

Permalink
ENH: fully cover the logical test cases in MetaProgrammingLibraryTest
Browse files Browse the repository at this point in the history
Only 7 of 8 cases were tested, and they were not sorted.
  • Loading branch information
dzenanz committed Sep 10, 2021
1 parent cd43985 commit dcd7dfd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Modules/Core/Common/test/itkMetaProgrammingLibraryTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ itkMetaProgrammingLibraryTest(int, char *[])

// Or between constants
static_assert((OrC<true, true, true>::Value == true), "Unit test failed");
static_assert((OrC<true, false, true>::Value == true), "Unit test failed");
static_assert((OrC<true, true, false>::Value == true), "Unit test failed");
static_assert((OrC<false, false, true>::Value == true), "Unit test failed");
static_assert((OrC<true, false, true>::Value == true), "Unit test failed");
static_assert((OrC<true, false, false>::Value == true), "Unit test failed");
static_assert((OrC<false, true, true>::Value == true), "Unit test failed");
static_assert((OrC<false, true, false>::Value == true), "Unit test failed");
static_assert((OrC<false, false, true>::Value == true), "Unit test failed");
static_assert((OrC<false, false, false>::Value == false), "Unit test failed");

static_assert((OrC<true, true>::Value == true), "Unit test failed");
Expand All @@ -42,11 +43,12 @@ itkMetaProgrammingLibraryTest(int, char *[])

// Or between types
static_assert((std::is_same<Or<TrueType, TrueType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<TrueType, FalseType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<TrueType, TrueType, FalseType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<FalseType, FalseType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<TrueType, FalseType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<TrueType, FalseType, FalseType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<FalseType, TrueType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<FalseType, TrueType, FalseType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<FalseType, FalseType, TrueType>::Type, TrueType>::value), "Unit test failed");
static_assert((std::is_same<Or<FalseType, FalseType, FalseType>::Type, FalseType>::value), "Unit test failed");

static_assert((std::is_same<Or<TrueType, TrueType>::Type, TrueType>::value), "Unit test failed");
Expand Down

0 comments on commit dcd7dfd

Please sign in to comment.