forked from M-Labs/artiq
test/lit: Basic ndarray smoke tests for all binops
This commit is contained in:
parent
4d002c7934
commit
7bdd6785b7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue