Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Oct 17, 2023
1 parent 4fce428 commit 65e179b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions integration_tests/symbolics_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,43 @@ def test_symbolic_operations():
assert(z == x + y)
assert(z1 == True)
assert(z2 == False)
if z.func == Add:
assert True
else:
assert False
print(z)

# Subtraction
w: S = x - y
w1: bool = w.func == Add
assert(w == x - y)
assert(w1 == True)
if w.func == Add:
assert True
else:
assert False
print(w)

# Multiplication
u: S = x * y
u1: bool = u.func == Mul
assert(u == x * y)
assert(u1 == True)
if u.func == Mul:
assert True
else:
assert False
print(u)

# Division
v: S = x / y
v1: bool = v.func == Mul
assert(v == x / y)
assert(v1 == True)
if v.func == Mul:
assert True
else:
assert False
print(v)

# Power
Expand All @@ -46,6 +62,10 @@ def test_symbolic_operations():
assert(p1 == True)
assert(p2 == False)
assert(p3 == False)
if p.func == Pow:
assert True
else:
assert False
print(p)

# Casting
Expand Down

0 comments on commit 65e179b

Please sign in to comment.