forked from M-Labs/artiq
1
0
Fork 0

test/lit: Basic ndarray smoke tests for all binops

This commit is contained in:
David Nadlinger 2020-07-29 23:22:50 +01:00
parent 4d002c7934
commit 7bdd6785b7
1 changed files with 21 additions and 0 deletions

View File

@ -8,6 +8,11 @@ assert c[0] == 5
assert c[1] == 7
assert c[2] == 9
c = b - a
assert c[0] == 3
assert c[1] == 3
assert c[2] == 3
c = a * b
assert c[0] == 4
assert c[1] == 10
@ -17,3 +22,19 @@ c = b // a
assert c[0] == 4
assert c[1] == 2
assert c[2] == 2
c = a ** b
assert c[0] == 1
assert c[1] == 32
assert c[2] == 729
c = b % a
assert c[0] == 0
assert c[1] == 1
assert c[2] == 0
# FIXME: Implement array coercion.
# c = b / a
# assert c[0] == 4.0
# assert c[1] == 2.5
# assert c[2] == 2.0