Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Jul 29, 2023
1 parent 1b39b9e commit 8b983e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration_tests/lpython_decorator_02.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from numpy import array
from lpython import i32, i64, f64, lpython, TypeVar
from lpython import i32, i64, f64, lpython, TypeVar, Const

n = TypeVar("n")

Expand All @@ -17,6 +17,10 @@ def multiply_02(n: i32, x: i64[:], y: i64[:]) -> i64[n]:
z[i] = x[i] * y[i]
return z

@lpython
def const_arg_sum(x: Const[i32]) -> i32:
return 10 + x


def test_01():
size = 5
Expand All @@ -30,5 +34,6 @@ def test_01():
z = multiply_02(size, x, y)
for i in range(size):
assert z[i] == x[i] * y[i]
assert const_arg_sum(size) == size + 10

test_01()

0 comments on commit 8b983e2

Please sign in to comment.