Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit ecb1cf6

Browse files
author
Ehsan Totoni
committed
test str concat, split
1 parent 0ac578a commit ecb1cf6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

hpat/tests/test_strings.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,19 @@ def test_impl(_str):
3030
hpat_func = hpat.jit(test_impl)
3131
self.assertEqual(hpat_func(arg), test_impl(arg))
3232

33+
def test_concat(self):
34+
def test_impl(_str):
35+
return (_str+'test_str')
36+
hpat_func = hpat.jit(test_impl)
37+
arg = 'a_'
38+
self.assertEqual(hpat_func(arg), test_impl(arg))
39+
40+
def test_split(self):
41+
def test_impl(_str):
42+
return _str.split('/')
43+
hpat_func = hpat.jit(test_impl)
44+
arg = 'aa/bb/cc'
45+
self.assertEqual(hpat_func(arg), test_impl(arg))
46+
3347
if __name__ == "__main__":
3448
unittest.main()

0 commit comments

Comments
 (0)