Skip to content

Commit e0884b3

Browse files
committed
add a test with TODO
1 parent ac6797b commit e0884b3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

integration_tests/run_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"test_c_interop_01.py",
3535
"test_generics_01.py",
3636
"test_cmath.py",
37+
"test_complex.py"
3738
]
3839

3940
# CPython tests only

integration_tests/test_complex.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from ltypes import f64, c64
2+
3+
def test_real_imag():
4+
x: c64
5+
x = 2 + 3j
6+
a: f64
7+
b: f64
8+
eps: f64
9+
eps = 1e-12
10+
a = x.real
11+
b = x.imag
12+
assert abs(a - 2) < eps
13+
# TODO: below test should work
14+
# assert abs(b - 3) < eps
15+
16+
test_real_imag()

0 commit comments

Comments
 (0)