summaryrefslogtreecommitdiffstats
path: root/scilab/modules/sparse
diff options
context:
space:
mode:
authorYann Collette <yann.collette@scilab.org>2010-02-04 09:41:04 +0100
committerYann Collette <yann.collette@scilab.org>2010-02-04 09:41:04 +0100
commitd1c995b275169e94a66c83187c5db3226f54d3f2 (patch)
tree4450840e0c3a84bb9c533ac947c73d32522724b8 /scilab/modules/sparse
parent75a9837ab7199e79b5148a39664c41259a3bf34e (diff)
downloadscilab-d1c995b275169e94a66c83187c5db3226f54d3f2.zip
scilab-d1c995b275169e94a66c83187c5db3226f54d3f2.tar.gz
add a nonreg test for bug 6412
Diffstat (limited to 'scilab/modules/sparse')
-rw-r--r--scilab/modules/sparse/tests/nonreg_tests/bug_6412.dia.ref19
-rw-r--r--scilab/modules/sparse/tests/nonreg_tests/bug_6412.tst22
2 files changed, 41 insertions, 0 deletions
diff --git a/scilab/modules/sparse/tests/nonreg_tests/bug_6412.dia.ref b/scilab/modules/sparse/tests/nonreg_tests/bug_6412.dia.ref
new file mode 100644
index 0000000..b364f09
--- /dev/null
+++ b/scilab/modules/sparse/tests/nonreg_tests/bug_6412.dia.ref
@@ -0,0 +1,19 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Yann COLLETTE <yann.collette@scilab.fr>
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- JVM NOT MANDATORY -->
8// <-- Non-regression test for bug 6412 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/show_bug.cgi?id=6412
12//
13// <-- Short Description -->
14// the function sp2adj was not working
15A = sprand(100,50,.05);
16[xadj,adjncy,anz]= sp2adj(A);
17[n,m]=size(A);
18p = adj2sp(xadj,adjncy,anz,[n,m]);
19if norm(A-p)~=0 then bugmes();quit;end
diff --git a/scilab/modules/sparse/tests/nonreg_tests/bug_6412.tst b/scilab/modules/sparse/tests/nonreg_tests/bug_6412.tst
new file mode 100644
index 0000000..1ba5428
--- /dev/null
+++ b/scilab/modules/sparse/tests/nonreg_tests/bug_6412.tst
@@ -0,0 +1,22 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Yann COLLETTE <yann.collette@scilab.fr>
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- JVM NOT MANDATORY -->
9
10// <-- Non-regression test for bug 6412 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=6412
14//
15// <-- Short Description -->
16// the function sp2adj was not working
17
18A = sprand(100,50,.05);
19[xadj,adjncy,anz]= sp2adj(A);
20[n,m]=size(A);
21p = adj2sp(xadj,adjncy,anz,[n,m]);
22if norm(A-p)~=0 then pause, end