mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
4975b6e9fa
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
29 lines
777 B
TOML
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}
|
|
]}]'''
|