object-introspection/test/integration/thrift_namespaces.toml
Jake Hillion 4975b6e9fa test: add features field to integration tests
Previously we tested different feature flags by using the `cli_options` field
in the test `.toml`. This works for OID but doesn't work for JIT OIL and won't
work for AoT OIL when those tests get added.

This change adds a new higher level `features` field to the test `.toml` which
adds the features to the config file as a prefix. This works with all methods
of generation.

Change the existing `cli_options` features to `features` except for where
they're testing something specific. Enable tests that were previously disabled
for OIL but only didn't work because of not being able to enable features.
Change pointer tests that are currently broken for OIL from `oil_disable` to
`oil_skip` - they can work, but codegen is broken for them at the minute.

Test plan:
- CI
- `make test` is no worse
2024-01-16 16:23:21 +00:00

29 lines
777 B
TOML

thrift_definitions = '''
namespace cpp2 namespaceA.namespaceB
struct TTTTT {
1: i32 a;
2: i32 b;
3: i32 c;
}
'''
[cases]
[cases.a]
oil_skip = 'enum type template arguments do not match' # https://github.com/facebookexperimental/object-introspection/issues/297
param_types = ["const namespaceA::namespaceB::TTTTT&"]
setup = '''
namespaceA::namespaceB::TTTTT ret;
return ret;
'''
features = ["capture-thrift-isset"]
expect_json = '''[{
"staticSize":16,
"dynamicSize":0,
"members":[
{"name":"__fbthrift_field_a", "staticSize":4},
{"name":"__fbthrift_field_b", "staticSize":4},
{"name":"__fbthrift_field_c", "staticSize":4},
{"name":"__isset", "staticSize":3}
]}]'''