Integration Tests: Test enums

This commit is contained in:
Alastair Robertson 2023-02-14 05:58:34 -08:00 committed by Alastair Robertson
parent 18e636d68d
commit 340a5e6803
2 changed files with 34 additions and 0 deletions

View File

@ -3,6 +3,7 @@ set(INTEGRATION_TEST_CONFIGS
anonymous.toml
container_enums.toml
cycles.toml
enums.toml
ignored.toml
inheritance_access.toml
inheritance_multiple.toml

View File

@ -0,0 +1,33 @@
definitions = '''
enum class ScopedEnum {
CaseA,
CaseB,
CaseC,
};
enum class ScopedEnumInt8 : int8_t {
CaseA,
CaseB,
CaseC,
};
enum UNSCOPED_ENUM {
CASE_A,
CASE_B,
CASE_C,
};
'''
[cases]
[cases.scoped]
param_types = ["ScopedEnum"]
setup = "return {};"
expect_json = '[{"staticSize":4, "dynamicSize":0}]'
[cases.scoped_int8]
param_types = ["ScopedEnumInt8"]
setup = "return {};"
expect_json = '[{"staticSize":1, "dynamicSize":0}]'
[cases.unscoped]
param_types = ["UNSCOPED_ENUM"]
setup = "return {};"
expect_json = '[{"staticSize":4, "dynamicSize":0}]'