Skip to content

Commit

Permalink
Update test_language.py
Browse files Browse the repository at this point in the history
  • Loading branch information
glorialeezero committed Dec 6, 2024
1 parent ed53dcd commit 0b24b30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_language.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from qupsy.language import GateCmd, HoleCmd, Integer, Pgm, Ry, SeqCmd
from qupsy.language import GateCmd, HoleCmd, Integer, Mul, Pgm, Ry, SeqCmd


def test_pgm_create_with_empty_body():
Expand All @@ -25,3 +25,9 @@ def test_seq_cmd_wo_pre_and_post():
seq = SeqCmd()
assert isinstance(seq.pre, HoleCmd)
assert isinstance(seq.post, HoleCmd)


def test_pgm_call():
pgm = Mul(Integer(2), Integer(3))
res = pgm.__call__({"n": 5})
assert res == 6

0 comments on commit 0b24b30

Please sign in to comment.