Skip to content

Commit b5e9bac

Browse files
committed
Add tests
1 parent d9e3bef commit b5e9bac

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/errors/arrays_01.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from lpython import (i8, i32, dataclass)
2+
from numpy import empty, int8
3+
4+
# test issue-2088
5+
6+
@dataclass
7+
class LPBHV_small:
8+
dim : i32 = 4
9+
a : i8[4] = empty(4, dtype=int8)
10+
11+
12+
def g() -> None:
13+
l2 : LPBHV_small = LPBHV_small(
14+
4,
15+
[i8(214), i8(157), i8(3), i8(146)])
16+
17+
g()

tests/tests.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ asr = true
651651
filename = "errors/structs_01.py"
652652
asr = true
653653

654+
[[test]]
655+
filename = "errors/arrays_01.py"
656+
asr = true
657+
654658
[[test]]
655659
filename = "errors/structs_02.py"
656660
asr = true

0 commit comments

Comments
 (0)