Skip to content

Commit 02c844b

Browse files
committed
extend int testing for multiplication
1 parent 6231f3e commit 02c844b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_qlassf_int.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,16 @@ def test_mul_and_sum(self):
402402
qf = qlassf(f, to_compile=COMPILATION_ENABLED, compiler=self.compiler)
403403
compute_and_compare_results(self, qf)
404404

405+
def test_mult_multconst(self):
406+
f = "def test(a: Qint2, b: Qint2) -> Qint4:\n\treturn (a * b) * 5"
407+
qf = qlassf(f, compiler=self.compiler, to_compile=COMPILATION_ENABLED)
408+
compute_and_compare_results(self, qf)
409+
410+
def test_mul_const(self):
411+
f = "def test(a: Qint2, b: Qint4) -> Qint4:\n\treturn (a * 3) + b"
412+
qf = qlassf(f, compiler=self.compiler, to_compile=COMPILATION_ENABLED)
413+
compute_and_compare_results(self, qf)
414+
405415
# def test_mul4(self):
406416
# f = "def test(a: Qint4, b: Qint4) -> Qint4: return a * b"
407417
# qf = qlassf(f, to_compile=COMPILATION_ENABLED, compiler=self.compiler)

0 commit comments

Comments
 (0)