mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
Integration Tests: Test typedefs
This commit is contained in:
parent
340a5e6803
commit
9dd5c4b4cc
@ -43,6 +43,7 @@ set(INTEGRATION_TEST_CONFIGS
|
|||||||
std_variant.toml
|
std_variant.toml
|
||||||
std_vector.toml
|
std_vector.toml
|
||||||
std_vector_del_allocator.toml
|
std_vector_del_allocator.toml
|
||||||
|
typedefs.toml
|
||||||
typedefed_parent.toml
|
typedefed_parent.toml
|
||||||
)
|
)
|
||||||
|
|
||||||
|
43
test/integration/typedefs.toml
Normal file
43
test/integration/typedefs.toml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
includes = ["vector"]
|
||||||
|
definitions = '''
|
||||||
|
typedef uint64_t UInt64;
|
||||||
|
using IntVector = std::vector<int>;
|
||||||
|
'''
|
||||||
|
[cases]
|
||||||
|
[cases.c_style]
|
||||||
|
param_types = ["UInt64"]
|
||||||
|
setup = "return {};"
|
||||||
|
expect_json = '''[{
|
||||||
|
"staticSize":8,
|
||||||
|
"dynamicSize":0,
|
||||||
|
"isTypedef":true,
|
||||||
|
"typeName":"UInt64",
|
||||||
|
"members":[
|
||||||
|
{
|
||||||
|
"staticSize":8,
|
||||||
|
"dynamicSize":0,
|
||||||
|
"isTypedef":false,
|
||||||
|
"typeName":"uint64_t",
|
||||||
|
"NOT":"members"
|
||||||
|
}
|
||||||
|
]}]'''
|
||||||
|
[cases.using]
|
||||||
|
param_types = ["const IntVector&"]
|
||||||
|
setup = "return {};"
|
||||||
|
expect_json = '''[{
|
||||||
|
"staticSize":24,
|
||||||
|
"dynamicSize":0,
|
||||||
|
"isTypedef":true,
|
||||||
|
"typeName":"IntVector",
|
||||||
|
"members":[
|
||||||
|
{
|
||||||
|
"staticSize":24,
|
||||||
|
"dynamicSize":0,
|
||||||
|
"length":0,
|
||||||
|
"capacity":0,
|
||||||
|
"elementStaticSize":4,
|
||||||
|
"isTypedef":false,
|
||||||
|
"typeName":"vector<int, std::allocator<int> >",
|
||||||
|
"NOT":"members"
|
||||||
|
}
|
||||||
|
]}]'''
|
Loading…
Reference in New Issue
Block a user