C types and utilities to validate and access struct and message headers
This provides simple C types and utilities for validating Mojo struct
and message headers and accessing their data. These utilities are
written in C without any dependencies other than typedefs from the
stdbool.h and stdint.h headers so they should be usable in programs
that use different libcs or no libc at all.
These utilities are general for all struct / messages, there's no
codegen (yet) for particular structures or interfaces. As such it's
difficult to reuse the existing validation conformance tests as they do
not distinguish cleanly between tests for the Mojo archive format and
tests for mojom-generated interfaces. For now tests for these routine
are hand written reusing the validation input format but ideally they
would share data with the validation tests for other languages.
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/1654373002 .
diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn
index a5ef8c7..1909cb3 100644
--- a/mojo/BUILD.gn
+++ b/mojo/BUILD.gn
@@ -98,6 +98,7 @@
":mojo_public_application_unittests",
":mojo_public_bindings_perftests",
":mojo_public_bindings_unittests",
+ ":mojo_public_c_bindings_unittests",
":mojo_public_environment_unittests",
":mojo_public_system_perftests",
":mojo_public_system_unittests",
@@ -120,6 +121,13 @@
]
}
+test("mojo_public_c_bindings_unittests") {
+ deps = [
+ "//mojo/edk/test:run_all_unittests",
+ "//mojo/public/c/bindings/tests",
+ ]
+}
+
test("mojo_public_bindings_perftests") {
deps = [
"//mojo/edk/test:run_all_perftests",