From 93391382eec79bbd1a743525c0d9703fe0bdc3b3 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Tue, 1 Aug 2023 23:48:19 +0530 Subject: [PATCH] TEST: WASM: Add for string length --- integration_tests/CMakeLists.txt | 1 + integration_tests/test_str_04.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 integration_tests/test_str_04.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index f7c33230ac3..56a07b2c620 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -494,6 +494,7 @@ RUN(NAME test_types_02 LABELS cpython llvm c wasm) 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_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) diff --git a/integration_tests/test_str_04.py b/integration_tests/test_str_04.py new file mode 100644 index 00000000000..c0ede7991f6 --- /dev/null +++ b/integration_tests/test_str_04.py @@ -0,0 +1,11 @@ +def main0(): + x: str + x = "abcdefghijkl" + print(len(x)) + assert len(x) == 12 + + y: str = "123" + print(len(y)) + assert len(y) == 3 + +main0()