Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed May 12, 2023
1 parent 797f1ba commit 3be64d2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ RUN(NAME enum_04 LABELS cpython llvm c)
RUN(NAME enum_05 LABELS llvm c
EXTRAFILES enum_05b.c)
RUN(NAME enum_06 LABELS cpython llvm c)
RUN(NAME enum_07 IMPORT_PATH ..
LABELS cpython llvm c)
RUN(NAME union_01 LABELS cpython llvm c)
RUN(NAME union_02 LABELS llvm c)
RUN(NAME union_03 LABELS cpython llvm c)
Expand Down
7 changes: 7 additions & 0 deletions integration_tests/enum_07.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from enum_07_module import Constants

def check():
assert Constants.NUM_ELEMS.value == 4
assert Constants.NUM_CHECK.value == 51

check()
6 changes: 6 additions & 0 deletions integration_tests/enum_07_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from enum import Enum
from lpython import i32

class Constants(Enum):
NUM_ELEMS: i32 = 4
NUM_CHECK: i32 = 51

0 comments on commit 3be64d2

Please sign in to comment.