diff --git a/src/app/tests/suites/include/ValueChecker.h b/src/app/tests/suites/include/ValueChecker.h index d629626f4cd11d..3fa032a4db638a 100644 --- a/src/app/tests/suites/include/ValueChecker.h +++ b/src/app/tests/suites/include/ValueChecker.h @@ -69,7 +69,7 @@ class ValueChecker // Allow a different expected type from the actual value type, because if T // is short the literal we are using is not short-typed. - template ::value, int> = 0> + template ::value && !std::is_enum::value, int> = 0> bool CheckValue(const char * itemName, T current, U expected) { if (current != expected) @@ -82,6 +82,12 @@ class ValueChecker return true; } + template ::value && std::is_enum::value, int> = 0> + bool CheckValue(const char * itemName, T current, U expected) + { + return CheckValue(itemName, current, chip::to_underlying(expected)); + } + template ::value, int> = 0> bool CheckValue(const char * itemName, T current, U expected) {