1REQUIRES: system-windows, msvc
2RUN: %build --compiler=msvc --arch=32 --nodefaultlib --output=%T/SimpleTypesTest.cpp.enums.exe %S/Inputs/SimpleTypesTest.cpp
3RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM %s
4RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_CONST %s
5RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_EMPTY %s
6RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_UCHAR %s
7RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_CLASS %s
8RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_STRUCT %s
9
10; FIXME: PDB does not have information about scoped enumeration (Enum class) so the
11; compiler type used is the same as the one for unscoped enumeration.
12
13ENUM:      Type{{.*}} , name = "Enum", size = 4, decl = simpletypestest.cpp:19, compiler_type = {{.*}} enum Enum {
14ENUM_NEXT:    RED,
15ENUM_NEXT:    GREEN,
16ENUM_NEXT:    BLUE
17ENUM_NEXT:}
18
19ENUM_CONST:      Type{{.*}} , name = "EnumConst", size = 4,  decl = simpletypestest.cpp:22, compiler_type = {{.*}} enum EnumConst {
20ENUM_CONST-NEXT:    LOW,
21ENUM_CONST-NEXT:    NORMAL,
22ENUM_CONST-NEXT:    HIGH
23ENUM_CONST-NEXT:}
24
25ENUM_EMPTY:      Type{{.*}} , name = "EnumEmpty", size = 4,  decl = simpletypestest.cpp:25, compiler_type = {{.*}} enum EnumEmpty {
26ENUM_EMPTY-NEXT:}
27
28ENUM_UCHAR:      Type{{.*}} , name = "EnumUChar", size = 1,  decl = simpletypestest.cpp:28, compiler_type = {{.*}} enum EnumUChar {
29ENUM_UCHAR-NEXT:    ON,
30ENUM_UCHAR-NEXT:    OFF,
31ENUM_UCHAR-NEXT:    AUTO
32ENUM_UCHAR-NEXT:}
33
34; Note that `enum EnumClass` is tested instead of `enum class EnumClass`
35ENUM_CLASS:      Type{{.*}} , name = "EnumClass", size = 4,  decl = simpletypestest.cpp:32, compiler_type = {{.*}} enum EnumClass {
36ENUM_CLASS-NEXT:    YES,
37ENUM_CLASS-NEXT:    NO,
38ENUM_CLASS-NEXT:    DEFAULT
39ENUM_CLASS-NEXT:}
40
41ENUM_STRUCT:      Type{{.*}} , name = "EnumStruct", size = 4,  decl = simpletypestest.cpp:35, compiler_type = {{.*}} enum EnumStruct {
42ENUM_STRUCT-NEXT:    red,
43ENUM_STRUCT-NEXT:    blue,
44ENUM_STRUCT-NEXT:    black
45ENUM_STRUCT-NEXT:}
46