Skip to content

Commit af322ae

Browse files
committed
add a test with TODO
1 parent 8172542 commit af322ae

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
@@ -32,6 +32,7 @@
3232
"test_math_02.py",
3333
"test_c_interop_01.py",
3434
"test_generics_01.py",
35+
"test_complex.py"
3536
]
3637

3738
# 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)