Add common data structures

This adds some common data structures and functions needed for RDE BEJ.

The decoder core is written in C so that we can use this with some other
future platforms.
clang-tidy is complaining about C style header. I tried adding a
.clang-tidy-ignore file but it did not work. And since this is mainly a
C library, I deleted the .clang-tidy.

Signed-off-by: Kasun Athukorala <kasunath@google.com>
Change-Id: Ice07527b23cd00c65cd11ed114ea4faefcc085fb
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..a775a0c
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,26 @@
+gtest = dependency('gtest', main: true, disabler: true, required: get_option('tests'))
+gmock = dependency('gmock', disabler: true, required: get_option('tests'))
+
+if not gtest.found() or not gmock.found()
+  gtest_proj = import('cmake').subproject('googletest', required: false)
+  if gtest_proj.found()
+    gtest = declare_dependency(
+      dependencies: [
+        gtest_proj.dependency('gtest'),
+        gtest_proj.dependency('gtest_main'),
+      ])
+    gmock = gtest_proj.dependency('gmock')
+  else
+    assert(not get_option('tests').enabled(), 'Googletest is required')
+  endif
+endif
+
+gtests = [
+  'rde_common',
+]
+foreach t : gtests
+  test(t, executable(t.underscorify(), t + '_test.cpp',
+                     build_by_default: false,
+                     implicit_include_directories: false,
+                     dependencies: [libbej, gtest, gmock]))
+endforeach