Skip to content

Commit

Permalink
test:minor
Browse files Browse the repository at this point in the history
1. Added a test for str.count() and included it over CMakeList.txt
  • Loading branch information
SudhanshuJoshi09 committed Sep 27, 2023
1 parent 7be42a2 commit fbbd4c4
Show file tree
Hide file tree
Showing 2 changed files with 13 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 @@ -519,6 +519,7 @@ RUN(NAME test_str_01 LABELS cpython llvm c)
RUN(NAME test_str_02 LABELS cpython llvm c)
RUN(NAME test_str_03 LABELS cpython llvm c)
RUN(NAME test_str_04 LABELS cpython llvm c wasm)
RUN(NAME test_str_05 LABELS cpython llvm c)
RUN(NAME test_list_01 LABELS cpython llvm c)
RUN(NAME test_list_02 LABELS cpython llvm c)
RUN(NAME test_list_03 LABELS cpython llvm c NOFAST)
Expand Down
12 changes: 12 additions & 0 deletions integration_tests/test_str_05.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def main0():
x: str
x = "Hello, World"
y: str
y = "o"
assert x.count(y) == 2
y = ""
assert x.count(y) == len(x) + 1
y = "Hello,"
assert x.count(y) == 1

main0()

0 comments on commit fbbd4c4

Please sign in to comment.