commit | c473fa4721ffad75be71a9064b88b646f11d92b1 | [log] [tgz] |
---|---|---|
author | Mitchell Kember <mkember@google.com> | Tue Oct 27 16:43:27 2020 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Tue Oct 27 16:43:27 2020 +0000 |
tree | 51577a8f88a0784d17830b181327ea6af97d9882 | |
parent | e4753700bd67a4f3aca225ab5ac257123c9ace66 [diff] |
[gidl][hlcpp] Enable more handle tests for HLCPP This CL enables more GIDL handle tests for HLCPP that were omitted in Iabf87cf877b31cd33c50622888f098c97fab5449. To make this work: * fidlgen_hlcpp now emits `#ifdef`s based on the `resource` modifier instead of the `is_resource` typeshape field. This is needed because the code for `flexible resource union Foo {};` has a method taking `zx::handle`, but the typeshape field is false. * GIDL now emits `#ifdef`s in HLCPP when the top-level type is resource (as before) or when handle_defs is nonempty (new). This is needed for decode_failure tests on value types rejecting handles. The first change is accomplished using .IsResourceType from the embedded Resourceness struct (represents the modifier) instead of the .IsResource bool copied from the typeshape. This similar naming is confusing, but it will be resolved soon when the typeshape field is removed in I2e2ba2035f8e76004c2d4b9e64638501844b2761 (currently blocked). This also removes xunion_handles_unittest.cc since all its tests are now covered by union.gidl. Test: fx test fidl-hlcpp-conformance-test Test: fx test fidl_cpp_host_conformance_test Bug: 36441 Bug: 62576 Change-Id: I643537a0b12c2d1480e734f31377c0ac356ee266 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/443451 Commit-Queue: Mitchell Kember <mkember@google.com> Reviewed-by: Felix Zhu <fcz@google.com> Testability-Review: Felix Zhu <fcz@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.