This directory contains the FIDL test libraries used for golden files.
To add a new standalone library:
foo_bar..test.fidl extension, e.g. foo_bar.test.fidl.test. followed by name without underscores, e.g. library test.foobar;.standalone_libraries list in BUILD.gn.fidl_testdata_info in info.gni, providing the name and the target that BUILD.gn generates, e.g.:{
name = "foo_bar"
target = "//tools/fidl/fidlc/testdata:test.foobar"
}
To add a new library with dependencies, you must create a subdirectory containing multiple FIDL files. This should only be done to accommodate dependencies, not to group together similar standalone libraries.
foo_bar..test.fidl and a BUILD.gn to build them.test.foobar, and that its build target name is the same.fidl_testdata_info in info.gni, providing the name and the target that BUILD.gn generates, e.g.:{
name = "foo_bar"
target = "//tools/fidl/fidlc/testdata/foo_bar:test.foobar"
}
FIDL tools in //tools/fidl use the test libraries as input when defining golden tests with //build/testing/golden_files.gni.
To check or update all FIDL-related goldens, run fx check-goldens fidl.