Skip to content

Commit 310da3c

Browse files
committed
LLVM: Add and update tests
1 parent 7f5d608 commit 310da3c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ RUN(NAME test_dict_07 LABELS cpython llvm)
295295
RUN(NAME test_dict_08 LABELS cpython llvm c)
296296
RUN(NAME test_dict_09 LABELS cpython llvm c)
297297
RUN(NAME test_dict_10 LABELS cpython llvm) # TODO: Add support of dict with string in C backend
298-
RUN(NAME test_dict_11 LABELS cpython c) # TODO: Add LLVM support
298+
RUN(NAME test_dict_11 LABELS cpython llvm c)
299299
RUN(NAME test_for_loop LABELS cpython llvm c)
300300
RUN(NAME modules_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
301301
RUN(NAME modules_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64)

integration_tests/test_dict_11.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@ def test_dict_11():
44
num : dict[i32, i32]
55
num = {11: 22, 33: 44, 55: 66}
66
assert num.get(7, -1) == -1
7+
assert num.get(11, -1) == 22
8+
assert num.get(33, -1) == 44
9+
assert num.get(55, -1) == 66
10+
assert num.get(72, -110) == -110
11+
d : dict[i32, str]
12+
d = {1: "1", 2: "22", 3: "333"}
13+
assert d.get(2, "00") == "22"
14+
assert d.get(21, "nokey") == "nokey"
715

816
test_dict_11()

0 commit comments

Comments
 (0)