Skip to content

Commit

Permalink
set len test
Browse files Browse the repository at this point in the history
  • Loading branch information
kabra1110 committed Jul 8, 2023
1 parent f0a7e61 commit 31080dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ RUN(NAME test_dict_12 LABELS cpython llvm c)
RUN(NAME test_dict_13 LABELS cpython llvm c)
RUN(NAME test_dict_bool LABELS cpython llvm)
RUN(NAME test_dict_increment LABELS cpython llvm)
RUN(NAME test_set_len LABELS cpython llvm)
RUN(NAME test_for_loop LABELS cpython llvm c)
RUN(NAME modules_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
RUN(NAME modules_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
Expand Down
8 changes: 8 additions & 0 deletions integration_tests/test_set_len.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from lpython import i32

def test_set():
s: set[i32]
s = {1, 2, 22, 2, -1, 1}
assert len(s) == 4

test_set()

0 comments on commit 31080dc

Please sign in to comment.