From 02c844b3337719bbf9057bc9337dcdac6be39e02 Mon Sep 17 00:00:00 2001 From: "Davide Gessa (dakk)" Date: Wed, 15 Nov 2023 10:33:12 +0100 Subject: [PATCH] extend int testing for multiplication --- test/test_qlassf_int.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_qlassf_int.py b/test/test_qlassf_int.py index 06a03181..80ed9768 100644 --- a/test/test_qlassf_int.py +++ b/test/test_qlassf_int.py @@ -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)