Skip to content

Commit

Permalink
extend int testing for multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Nov 15, 2023
1 parent 6231f3e commit 02c844b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_qlassf_int.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,16 @@ def test_mul_and_sum(self):
qf = qlassf(f, to_compile=COMPILATION_ENABLED, compiler=self.compiler)
compute_and_compare_results(self, qf)

def test_mult_multconst(self):
f = "def test(a: Qint2, b: Qint2) -> Qint4:\n\treturn (a * b) * 5"
qf = qlassf(f, compiler=self.compiler, to_compile=COMPILATION_ENABLED)
compute_and_compare_results(self, qf)

def test_mul_const(self):
f = "def test(a: Qint2, b: Qint4) -> Qint4:\n\treturn (a * 3) + b"
qf = qlassf(f, compiler=self.compiler, to_compile=COMPILATION_ENABLED)
compute_and_compare_results(self, qf)

# def test_mul4(self):
# f = "def test(a: Qint4, b: Qint4) -> Qint4: return a * b"
# qf = qlassf(f, to_compile=COMPILATION_ENABLED, compiler=self.compiler)
Expand Down

0 comments on commit 02c844b

Please sign in to comment.