tree: b95fae8b5075e425e5c9914168d89467cf854bc6 [path history] [tgz]
  1. abi_tests.cc
  2. BUILD.gn
  3. cpp_types_tests.cc
  4. decoding_tests.cc
  5. encoding_tests.cc
  6. extra_messages.h
  7. extra_messages.test.fidl
  8. fidl_align_tests.cc
  9. fidl_coded_types.cc
  10. fidl_coded_types.h
  11. fidl_structs.h
  12. formatting_tests.cc
  13. handle_closing_tests.cc
  14. linearizing_tests.cc
  15. llcpp.test.fidl
  16. llcpp_client_test.cc
  17. llcpp_transaction_tests.cc
  18. llcpp_types_tests.cc
  19. llcpp_views_tests.cc
  20. main.cc
  21. message_tests.cc
  22. messages.test.fidl
  23. on_error_handle_tests.cc
  24. OWNERS
  25. README.md
  26. run_with_handle_policy_tests.cc
  27. transformer.test.fidl
  28. transformer_tests.c
  29. validate_string_tests.cc
  30. validating_tests.cc
zircon/system/utest/fidl/README.md

FIDL definitions used in unit testing

The FIDL workflow is tested at multiple levels. fidl_coded_types.cc contains hand-written coding tables for the message types, and their corresponding C structure definitions are found in fidl_structs.h. Most tests in encoding/decoding exercise these manual coding table definitions. Though not one-to-one generated, messages.test.fidl contains a general outline of the FIDL definitions under test, for reference.

On the other hand, certain FIDL constructs are used in the higher layers, but are not supported by the C bindings right now, e.g. tables. fidlc is able to generate the coding tables for FIDL tables, but cannot generate their binding APIs. In order to unit test the table code paths, we will generate and check in their coding tables extra_messages.cc from extra_messages.test.fidl.

The command to generate the contents of generated is:

fx build
fx exec zircon/system/utest/fidl/gen.sh

The manual generation/checking-in should go away once we have a more flexible build process that allows a test to declare dependency only on the coding tables, not the C client/server bindings. Alternatively we could add tables support to C/low-level C++ bindings (FIDL-431).