summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge Steer <serge.steer@scilab.org>2016-10-30 15:58:30 +0100
committerSerge Steer <serge.steer@scilab.org>2016-10-30 15:58:30 +0100
commit426dbacd7adbc04346db09a8fd17479c6f240198 (patch)
treeefac40c5ceb0c0353c40bd47e66405bcc09a3b3b
parent7125f73a255d1e343db4d3aa5312ba41f41cee19 (diff)
downloadscilab-426dbacd7adbc04346db09a8fd17479c6f240198.zip
scilab-426dbacd7adbc04346db09a8fd17479c6f240198.tar.gz
bug 14829 fix proposal
Change-Id: I52a05ac98a0f816d75985db36e0a0133f30250dd
-rw-r--r--scilab/modules/overloading/macros/%r_m_p.sci6
-rw-r--r--scilab/modules/overloading/tests/nonreg_tests/bug_14829.dia.ref17
-rw-r--r--scilab/modules/overloading/tests/nonreg_tests/bug_14829.tst17
3 files changed, 39 insertions, 1 deletions
diff --git a/scilab/modules/overloading/macros/%r_m_p.sci b/scilab/modules/overloading/macros/%r_m_p.sci
index 8ed66ec..3e20b08 100644
--- a/scilab/modules/overloading/macros/%r_m_p.sci
+++ b/scilab/modules/overloading/macros/%r_m_p.sci
@@ -13,5 +13,9 @@
13function [f1] = %r_m_p(r1,p2) 13function [f1] = %r_m_p(r1,p2)
14 // r = %r_m_p(r1, p2) <=> r = r1*p2 14 // r = %r_m_p(r1, p2) <=> r = r1*p2
15 // r1 = rational p2 = polynomial 15 // r1 = rational p2 = polynomial
16 f1 = p2*r1; 16 if size(p2,"*")==1 then
17 f1=p2*r1
18 else
19 f1 = p2.'*r1.';
20 end
17endfunction 21endfunction
diff --git a/scilab/modules/overloading/tests/nonreg_tests/bug_14829.dia.ref b/scilab/modules/overloading/tests/nonreg_tests/bug_14829.dia.ref
new file mode 100644
index 0000000..c463906
--- /dev/null
+++ b/scilab/modules/overloading/tests/nonreg_tests/bug_14829.dia.ref
@@ -0,0 +1,17 @@
1//<-- CLI SHELL MODE -->
2// =============================================================================
3// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
5//
6// This file is distributed under the same license as the Scilab package.
7// =============================================================================
8//
9// <-- Non-regression test for bug 14829 -->
10//
11// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/show_bug.cgi?id=14829
13//
14// <-- Short Description -->
15// The product of a rational matrix by a polynomial vector has been broken
16a=[1/%s 1/%s];b=[%s;%s];
17assert_checktrue(a*b==rlist(2,1,[]));
diff --git a/scilab/modules/overloading/tests/nonreg_tests/bug_14829.tst b/scilab/modules/overloading/tests/nonreg_tests/bug_14829.tst
new file mode 100644
index 0000000..c463906
--- /dev/null
+++ b/scilab/modules/overloading/tests/nonreg_tests/bug_14829.tst
@@ -0,0 +1,17 @@
1//<-- CLI SHELL MODE -->
2// =============================================================================
3// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
5//
6// This file is distributed under the same license as the Scilab package.
7// =============================================================================
8//
9// <-- Non-regression test for bug 14829 -->
10//
11// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/show_bug.cgi?id=14829
13//
14// <-- Short Description -->
15// The product of a rational matrix by a polynomial vector has been broken
16a=[1/%s 1/%s];b=[%s;%s];
17assert_checktrue(a*b==rlist(2,1,[]));