summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-16 04:31:50 +0200
committerSven Gothel <[email protected]>2020-10-16 04:31:50 +0200
commit0adbd24f79148f3fbcf3361f1a2744d9e275c81b (patch)
tree829fdbc6539b63007b991789771217a673df5157 /test
parentb477d8d7057d367feb0d87cccb212221b5992f82 (diff)
re-add cut-down test_basictypes01.cpp
Diffstat (limited to 'test')
-rw-r--r--test/direct_bt/test_basictypes01.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/direct_bt/test_basictypes01.cpp b/test/direct_bt/test_basictypes01.cpp
new file mode 100644
index 00000000..0952511f
--- /dev/null
+++ b/test/direct_bt/test_basictypes01.cpp
@@ -0,0 +1,37 @@
+#include <iostream>
+#include <cassert>
+#include <cinttypes>
+#include <cstring>
+
+#include <cppunit.h>
+
+#include <jau/basic_types.hpp>
+#include <direct_bt/BTAddress.hpp>
+
+using namespace direct_bt;
+using namespace jau;
+
+// Test examples.
+class Cppunit_tests : public Cppunit {
+ public:
+ void single_test() override {
+ {
+ EUI48 mac01;
+ PRINTM("EUI48 size: whole0 "+std::to_string(sizeof(EUI48)));
+ PRINTM("EUI48 size: whole1 "+std::to_string(sizeof(mac01)));
+ PRINTM("EUI48 size: data1 "+std::to_string(sizeof(mac01.b)));
+ CHECKM("EUI48 struct and data size not matching", sizeof(EUI48), sizeof(mac01));
+ CHECKM("EUI48 struct and data size not matching", sizeof(mac01), sizeof(mac01.b));
+ }
+
+ }
+};
+
+int main(int argc, char *argv[]) {
+ (void)argc;
+ (void)argv;
+
+ Cppunit_tests test1;
+ return test1.run();
+}
+