mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-20 19:39:04 +01:00
38 lines
763 B
TOML
38 lines
763 B
TOML
|
definitions = '''
|
||
|
struct Foo {
|
||
|
int a, b, c;
|
||
|
};
|
||
|
|
||
|
struct Bar {
|
||
|
std::string a, b, c;
|
||
|
};
|
||
|
'''
|
||
|
|
||
|
[cases]
|
||
|
[cases.a]
|
||
|
param_types = ["const Bar&"]
|
||
|
setup = """
|
||
|
return Bar{
|
||
|
"The first member of the struct Bar",
|
||
|
"The second member of the struct Bar",
|
||
|
"The 3rd member of the struct Bar"
|
||
|
};
|
||
|
"""
|
||
|
config = """
|
||
|
[[codegen.ignore]]
|
||
|
type = "Foo"
|
||
|
members = ["a"]
|
||
|
|
||
|
[[codegen.ignore]]
|
||
|
type = "Bar"
|
||
|
members = ["b"]
|
||
|
"""
|
||
|
expect_json = '''[{
|
||
|
"staticSize":96,
|
||
|
"dynamicSize":66,
|
||
|
"members":[
|
||
|
{"name":"a", "staticSize":32, "dynamicSize":34},
|
||
|
{"name":"b", "staticSize":32, "dynamicSize":0},
|
||
|
{"name":"c", "staticSize":32, "dynamicSize":32}
|
||
|
]}]'''
|