From 46a727589a10770397134fe08db56b62691d71fa Mon Sep 17 00:00:00 2001 From: Christopher Durand Date: Sun, 19 Mar 2017 01:38:24 +0100 Subject: [PATCH] [architecture] Add test for conversion from FlagsOperators to FlagsGroup --- src/xpcc/architecture/interface/test/register_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xpcc/architecture/interface/test/register_test.cpp b/src/xpcc/architecture/interface/test/register_test.cpp index 283ad7206..c28959e2c 100644 --- a/src/xpcc/architecture/interface/test/register_test.cpp +++ b/src/xpcc/architecture/interface/test/register_test.cpp @@ -49,6 +49,11 @@ RegisterTest::testAssignments() a0 = translateCommonArgument(c3); TEST_ASSERT_EQUALS(a0, 0x42); + // flags operators to common struct + v0 = Test::A; + c0 = v0 | Test::C; + TEST_ASSERT_EQUALS(c0.value, 0b101); + // to register // these are not possible!