| 1 | #define BOOST_TEST_DYN_LINK
|
|---|
| 2 | #define BOOST_TEST_MODULE EnumExample
|
|---|
| 3 | #include <boost/test/unit_test.hpp>
|
|---|
| 4 |
|
|---|
| 5 | enum class Example {
|
|---|
| 6 | One,
|
|---|
| 7 | Two,
|
|---|
| 8 | };
|
|---|
| 9 |
|
|---|
| 10 | BOOST_AUTO_TEST_CASE(enum_example)
|
|---|
| 11 | {
|
|---|
| 12 | Example a = Example::One;
|
|---|
| 13 | Example b = Example::One;
|
|---|
| 14 | BOOST_REQUIRE_EQUAL(a, b);
|
|---|
| 15 | }
|
|---|