Skip to content

Commit 9dd5c4b

Browse files
committed
Integration Tests: Test typedefs
1 parent 340a5e6 commit 9dd5c4b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

test/integration/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ set(INTEGRATION_TEST_CONFIGS
4343
std_variant.toml
4444
std_vector.toml
4545
std_vector_del_allocator.toml
46+
typedefs.toml
4647
typedefed_parent.toml
4748
)
4849

test/integration/typedefs.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
includes = ["vector"]
2+
definitions = '''
3+
typedef uint64_t UInt64;
4+
using IntVector = std::vector<int>;
5+
'''
6+
[cases]
7+
[cases.c_style]
8+
param_types = ["UInt64"]
9+
setup = "return {};"
10+
expect_json = '''[{
11+
"staticSize":8,
12+
"dynamicSize":0,
13+
"isTypedef":true,
14+
"typeName":"UInt64",
15+
"members":[
16+
{
17+
"staticSize":8,
18+
"dynamicSize":0,
19+
"isTypedef":false,
20+
"typeName":"uint64_t",
21+
"NOT":"members"
22+
}
23+
]}]'''
24+
[cases.using]
25+
param_types = ["const IntVector&"]
26+
setup = "return {};"
27+
expect_json = '''[{
28+
"staticSize":24,
29+
"dynamicSize":0,
30+
"isTypedef":true,
31+
"typeName":"IntVector",
32+
"members":[
33+
{
34+
"staticSize":24,
35+
"dynamicSize":0,
36+
"length":0,
37+
"capacity":0,
38+
"elementStaticSize":4,
39+
"isTypedef":false,
40+
"typeName":"vector<int, std::allocator<int> >",
41+
"NOT":"members"
42+
}
43+
]}]'''

0 commit comments

Comments
 (0)