From 7fe9b8cc80de5c4965cec68d763fad0e774e6ba8 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 25 Nov 2024 14:09:32 +0100 Subject: [PATCH] Extend bitset test with boolean case * tests/idl4/default/client.cpp: * tests/idl4/default/test.idl: --- tests/idl4/default/client.cpp | 10 ++++++++++ tests/idl4/default/test.idl | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/idl4/default/client.cpp b/tests/idl4/default/client.cpp index 90d91335..0004e0b6 100644 --- a/tests/idl4/default/client.cpp +++ b/tests/idl4/default/client.cpp @@ -96,6 +96,16 @@ int main (int /*argc*/, char* /*argv*/[]) TAOX11_TEST_ERROR << "mybitset2.g() not 3 but: " << mybitset2.g() << std::endl; ++retval; } + if (mybitset1.x() != true) + { + TAOX11_TEST_ERROR << "mybitset1.x() not true but: " << mybitset1.x() << std::endl; + ++retval; + } + if (mybitset2.h() != false) + { + TAOX11_TEST_ERROR << "mybitset2.h() not false but: " << mybitset2.h() << std::endl; + ++retval; + } TestUnion_Octet tuo; TAOX11_TEST_INFO << "tuo: " << tuo << std::endl; diff --git a/tests/idl4/default/test.idl b/tests/idl4/default/test.idl index 9f5eaaee..87903774 100644 --- a/tests/idl4/default/test.idl +++ b/tests/idl4/default/test.idl @@ -58,7 +58,7 @@ struct Shape { }; bitset MyBitset1 { - bitfield<1> x; + @default(true) bitfield<1> x; bitfield<3> a; @default(5) bitfield<12, short> d; bitfield<33> tt; @@ -68,4 +68,5 @@ bitset MyBitset2 : MyBitset1 { bitfield<3> c; bitfield<2>; @default(3) bitfield<12, short> g; + bitfield<1> h; };