tree: d0ea6936729748f882f1b4b3e2281e81e06e767d [path history] [tgz]
  1. generated/
  2. abi_tests.cc
  3. BUILD.gn
  4. cpp_types_tests.cc
  5. decoding_tests.cc
  6. encoding_tests.cc
  7. extra_messages.h
  8. extra_messages.test.fidl
  9. fidl_align_tests.cc
  10. fidl_coded_types.cc
  11. fidl_coded_types.h
  12. fidl_structs.h
  13. formatting_tests.cc
  14. gen.sh
  15. handle_closing_tests.cc
  16. linearizing_tests.cc
  17. llcpp.test.fidl
  18. llcpp_transaction_tests.cc
  19. llcpp_types_tests.cc
  20. llcpp_views_tests.cc
  21. main.cc
  22. message_tests.cc
  23. messages.test.fidl
  24. on_error_handle_tests.cc
  25. OWNERS
  26. README.md
  27. run_with_handle_policy_tests.cc
  28. transformer.test.fidl
  29. transformer_conformance_tests.cc
  30. transformer_conformance_utils.cc
  31. transformer_conformance_utils.h
  32. transformer_tests.cc
  33. 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).