Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e21b05

Browse files
committed
Make the test use external symbol
1 parent 2ae4640 commit 1e21b05

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

tests/errors/bindc_10e.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from lpython import (i64, i16, CPtr, c_p_pointer, Pointer, sizeof, packed,
2-
dataclass, ccallable, ccall, i32)
1+
from lpython import i64, i16, CPtr, c_p_pointer, Pointer, sizeof, ccall, i32
2+
from bindc_10e_mod import S
33

44
@ccall
55
def _lfortran_malloc(size: i32) -> CPtr:
@@ -9,14 +9,6 @@ def _lfortran_malloc(size: i32) -> CPtr:
99
def alloc(buf_size:i64) -> CPtr:
1010
return _lfortran_malloc(i32(buf_size))
1111

12-
13-
@packed
14-
@dataclass
15-
class S:
16-
a: i16
17-
b: i64
18-
19-
2012
def main():
2113
p1: CPtr = alloc(sizeof(S))
2214
print(p1)

tests/errors/bindc_10e_mod.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from lpython import packed, dataclass, i16, i64
2+
3+
@packed
4+
@dataclass
5+
class S:
6+
a: i16
7+
b: i64

0 commit comments

Comments
 (0)