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

Commit a597473

Browse files
author
Ehsan Totoni
committed
test string pass/return
1 parent fbbde97 commit a597473

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

hpat/tests/test_strings.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import unittest
2+
import hpat
3+
4+
class TestString(unittest.TestCase):
5+
def test_pass_return(self):
6+
def test_impl(_str):
7+
return _str
8+
hpat_func = hpat.jit(test_impl)
9+
# pass single string and return
10+
arg = 'test_str'
11+
self.assertEqual(hpat_func(arg), test_impl(arg))
12+
# pass string list and return
13+
arg = ['test_str1', 'test_str2']
14+
self.assertEqual(hpat_func(arg), test_impl(arg))
15+
16+
if __name__ == "__main__":
17+
unittest.main()

0 commit comments

Comments
 (0)