I have the following enum:
namespace Country {
enum {
ITALY = 1,
SPAIN = 2
};
}
And the following UnitTest++ test:
TEST(something) {
CHECK_EQUAL(Country::SPAIN, object.getCountry(1)); // getCountry returns int
}
This doesn't work. I thought Country::SPAIN
would be automatically converted to int 2, but instead I get this error:
error: no matching function for call to ‘CheckEqual(UnitTest::TestResults&, Country::<anonymous enum>, int, UnitTest::TestDetails)’