Example:
typedef unsigned char my_type[32];
// … test code
ASSERT_ARE_EQUAL(my_type, a, b);
Fails to compile in CTEST_ASSERT_ARE_EQUAL because the code tries to cast/assign an array type:
#define CTEST_ASSERT_ARE_EQUAL(type, A, B, ...) \
do { \
const type A_value = (const type)(A); \
const type B_value = (const type)(B); \
error C2067: cast to array type is illegal
Instead, this does work:
typedef unsigned char my_type[32];
typedef my_type* my_type_ptr;
// … test code
ASSERT_ARE_EQUAL(my_type_ptr, &a, &b);