summaryrefslogtreecommitdiff
path: root/bindgen-integration/cpp/Test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen-integration/cpp/Test.cc')
-rw-r--r--bindgen-integration/cpp/Test.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/bindgen-integration/cpp/Test.cc b/bindgen-integration/cpp/Test.cc
index fa0ff827..1d962406 100644
--- a/bindgen-integration/cpp/Test.cc
+++ b/bindgen-integration/cpp/Test.cc
@@ -20,3 +20,31 @@ Test::Test(double foo)
: m_int(0)
, m_double(foo)
{}
+
+namespace bitfields {
+
+bool
+First::assert(unsigned char first,
+ unsigned char second,
+ unsigned char third)
+{
+ return three_bits_byte_one == first &&
+ six_bits_byte_two == second &&
+ two_bits_byte_two == third;
+}
+
+bool
+Second::assert(int first, bool second)
+{
+ return thirty_one_bits == first && one_bit == second;
+}
+
+bool
+Third::assert(int first, bool second, ItemKind third)
+{
+ return flags == first &&
+ is_whatever == second &&
+ kind == third;
+}
+
+}