object-introspection/test/integration/std_conditional.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
1.8 KiB
TOML
Raw Normal View History

2023-02-22 22:37:59 +00:00
definitions = '''
class A {
int f;
int g;
};
class B {
int h;
};
class C {
public:
// using T = std::conditional_t<alignof(int*) >= sizeof(char), A, B>;
std::conditional_t<alignof(int*) >= sizeof(char), A, B> foo;
};
'''
[cases]
[cases.a]
2023-08-16 20:40:36 +01:00
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/317
2023-02-22 22:37:59 +00:00
param_types = ["const C&"]
setup = '''
C foo;
return {foo};
'''
expect_json = '''
[
{
"typeName": "C",
"isTypedef": false,
"staticSize": 8,
"dynamicSize": 0,
"members": [
{
"name": "foo",
"typePath": "foo",
"isTypedef": true,
"staticSize": 8,
"dynamicSize": 0,
"members": [
{
"name": "",
"typePath": "",
"typeName": "type",
"isTypedef": true,
"staticSize": 8,
"dynamicSize": 0,
"members": [
{
"name": "",
"typePath": "",
"typeName": "A",
"isTypedef": false,
"staticSize": 8,
"dynamicSize": 0,
"members": [
{
"name": "f",
"typePath": "f",
"typeName": "int",
"isTypedef": false,
"staticSize": 4,
"dynamicSize": 0
},
{
"name": "g",
"typePath": "g",
"typeName": "int",
"isTypedef": false,
"staticSize": 4,
"dynamicSize": 0
}
]
}
]
}
]
}
]
}
]
'''