Skip to content

Commit 340a5e6

Browse files
committed
Integration Tests: Test enums
1 parent 18e636d commit 340a5e6

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

test/integration/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set(INTEGRATION_TEST_CONFIGS
33
anonymous.toml
44
container_enums.toml
55
cycles.toml
6+
enums.toml
67
ignored.toml
78
inheritance_access.toml
89
inheritance_multiple.toml

test/integration/enums.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
definitions = '''
2+
enum class ScopedEnum {
3+
CaseA,
4+
CaseB,
5+
CaseC,
6+
};
7+
8+
enum class ScopedEnumInt8 : int8_t {
9+
CaseA,
10+
CaseB,
11+
CaseC,
12+
};
13+
14+
15+
enum UNSCOPED_ENUM {
16+
CASE_A,
17+
CASE_B,
18+
CASE_C,
19+
};
20+
'''
21+
[cases]
22+
[cases.scoped]
23+
param_types = ["ScopedEnum"]
24+
setup = "return {};"
25+
expect_json = '[{"staticSize":4, "dynamicSize":0}]'
26+
[cases.scoped_int8]
27+
param_types = ["ScopedEnumInt8"]
28+
setup = "return {};"
29+
expect_json = '[{"staticSize":1, "dynamicSize":0}]'
30+
[cases.unscoped]
31+
param_types = ["UNSCOPED_ENUM"]
32+
setup = "return {};"
33+
expect_json = '[{"staticSize":4, "dynamicSize":0}]'

0 commit comments

Comments
 (0)