Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenthuberdeau committed Jan 22, 2025
1 parent 4f6b30c commit dad4e5e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/_all/enum-tests/enum-suite.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ enum Boolean {
TRUE
};

#define FIRST_VALUE 0
#define SECOND_VALUE 1000000
#define THIRD_VALUE 2000000
#define FORTH_VALUE FIRST_VALUE + SECOND_VALUE + THIRD_VALUE

enum LargeEnum {
FIRST = 0,
SECOND = 1000000,
THIRD = 2000000
FIRST = FIRST_VALUE,
SECOND = SECOND_VALUE,
THIRD = THIRD_VALUE,
FORTH = FORTH_VALUE,
};

int main(){
Expand Down Expand Up @@ -79,9 +85,9 @@ int main(){
}

putstring("Large Enum: ");
if (value == FIRST) {
if (FIRST_VALUE == FIRST) {
putstring("FIRST");
} else if (value == SECOND) {
} else if (SECOND_VALUE == SECOND) {
putstring("SECOND");
} else {
putstring("THIRD");
Expand Down

0 comments on commit dad4e5e

Please sign in to comment.