Skip to content

Commit

Permalink
Extend bitset test with boolean case
Browse files Browse the repository at this point in the history
    * tests/idl4/default/client.cpp:
    * tests/idl4/default/test.idl:
  • Loading branch information
jwillemsen committed Nov 25, 2024
1 parent cc6d3d6 commit 7fe9b8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions tests/idl4/default/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion tests/idl4/default/test.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -68,4 +68,5 @@ bitset MyBitset2 : MyBitset1 {
bitfield<3> c;
bitfield<2>;
@default(3) bitfield<12, short> g;
bitfield<1> h;
};

0 comments on commit 7fe9b8c

Please sign in to comment.