Boost logo

Boost :

Subject: [boost] [test] Using BOOST_CHECK_EQUAL with enum
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-08-23 17:41:00

In code I have the expression:


where 'cnew' is:

test_enum cnew;

and test_enum is:

enum test_enum

This is giving me the error:

..\..\../boost/test/test_tools.hpp:100:1: error: expected ')' before 'do'
  do { \
..\..\../boost/test/test_tools.hpp:169:5: note: in expansion of macro
::boost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK,
test_auto_value.cpp:64:4: note: in expansion of macro 'BOOST_CHECK_EQUAL'

Is Boost Test incapable of checking that an enumeration object equals an
enumerated value ? Is this a known problem ? How do I work around it ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at