diff options
author | Pierre Marechal <pierre.marechal@scilab.org> | 2007-11-27 07:53:08 +0000 |
---|---|---|
committer | Pierre Marechal <pierre.marechal@scilab.org> | 2007-11-27 07:53:08 +0000 |
commit | 4e001e847d1950af298f34baeab694277d52c551 (patch) | |
tree | 9466b86da7e493c250e57daf1ea2dc166d4858b5 /tests | |
parent | e334b99c4e16c871b8a6c02869b39dc684efcc95 (diff) | |
download | scilab-4e001e847d1950af298f34baeab694277d52c551.zip scilab-4e001e847d1950af298f34baeab694277d52c551.tar.gz |
Incoporate non-regression test files in the scilab source tree
Diffstat (limited to 'tests')
-rw-r--r-- | tests/nonRegression/bug1620.sci | 39 | ||||
-rw-r--r-- | tests/nonRegression/bug1625.sci | 33 | ||||
-rw-r--r-- | tests/nonRegression/bug1682.sci | 55 | ||||
-rw-r--r-- | tests/nonRegression/bug1684.sci | 38 | ||||
-rw-r--r-- | tests/nonRegression/bug1693.sci | 111 | ||||
-rw-r--r-- | tests/nonRegression/bug1711.sci | 35 | ||||
-rw-r--r-- | tests/nonRegression/bug1712.sci | 42 | ||||
-rw-r--r-- | tests/nonRegression/bug1720.sci | 39 | ||||
-rw-r--r-- | tests/nonRegression/bug1725.sci | 42 | ||||
-rw-r--r-- | tests/nonRegression/bug1732.sci | 35 | ||||
-rw-r--r-- | tests/nonRegression/bug1736.sci | 21 | ||||
-rw-r--r-- | tests/nonRegression/bug1742.sci | 29 | ||||
-rw-r--r-- | tests/nonRegression/bug1768.sci | 36 | ||||
-rw-r--r-- | tests/nonRegression/bug1772.sci | 23 |
14 files changed, 0 insertions, 578 deletions
diff --git a/tests/nonRegression/bug1620.sci b/tests/nonRegression/bug1620.sci deleted file mode 100644 index 00210c4..0000000 --- a/tests/nonRegression/bug1620.sci +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1620 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1620 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // Lorsque j'essaie de lire une matrice de taille 500x148, soit: | ||
8 | // -le programme me charge la matrice mais en decalant les elements (le | ||
9 | // premier de la deuxième ligne devient le dernier de la premiere) et en | ||
10 | // donnant la taille 500x149 -> il ne remonte aucun probleme, ce qui est | ||
11 | // pervers! | ||
12 | // - soit scilab me dit que la fonction fscanfMat ne dispose pas de | ||
13 | // memoire suffisante pour lire la matrice | ||
14 | // - soit scilab plante avec le message décrit ci-dessous. | ||
15 | // | ||
16 | // Lorsque je charge une matrice beaucoup plus grosse en nombre | ||
17 | // d'éléments | ||
18 | // (mais avec moins de colones), je n'ai aucun problème. Il ne s'agit | ||
19 | // donc pas vraiment d'un problème de taille mémoire. | ||
20 | // J'ai essayé d'augmenter la taille de la pile avec la commande | ||
21 | // gstacksize | ||
22 | // (n), mais cela n'a pas eu d'effet. Qu'en pensez vous? | ||
23 | // La commande clear nettoie-t-elle efficacement la mémoire? | ||
24 | // Merci de votre aide. | ||
25 | |||
26 | // Copyright INRIA | ||
27 | // Scilab Project - Pierre MARECHAL | ||
28 | // Copyright INRIA 2006 | ||
29 | // Date : 9 janvier 2006 | ||
30 | |||
31 | a=rand(500,148) | ||
32 | fprintfMat(TMPDIR+"/bug1620.txt",a); | ||
33 | b=fscanfMat(TMPDIR+"/bug1620.txt"); | ||
34 | |||
35 | if or(size(b)<>[500 148]) then | ||
36 | affich_result(%F,1620); | ||
37 | else | ||
38 | affich_result(%T,1620); | ||
39 | end | ||
diff --git a/tests/nonRegression/bug1625.sci b/tests/nonRegression/bug1625.sci deleted file mode 100644 index cfdb251..0000000 --- a/tests/nonRegression/bug1625.sci +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1625 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1625 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // This problem concerns th datenum function: | ||
8 | // I'm getting the following results | ||
9 | // | ||
10 | // -->datenum(1996,12,31) | ||
11 | // ans = | ||
12 | // | ||
13 | // 729389.8 | ||
14 | // | ||
15 | // -->datenum(1997,1,1) | ||
16 | // ans = | ||
17 | // | ||
18 | // 1.5 | ||
19 | |||
20 | // Copyright INRIA | ||
21 | // Scilab Project - Pierre MARECHAL | ||
22 | // Copyright INRIA 2005 | ||
23 | // Date : 28 décembre 2005 | ||
24 | |||
25 | test1 = ( datenum(1997,1,1) == 729391 ); | ||
26 | test2 = ( datenum(1996,12,31) == floor(datenum(1996,12,31)) ); | ||
27 | test3 = ( datenum(1997,1,1,23,59,59) - datenum(1997,1,1) < 1 ) | ||
28 | |||
29 | if ( test1 & test2 & test3 ) then | ||
30 | affich_result(%T,1625); | ||
31 | else | ||
32 | affich_result(%F,1625); | ||
33 | end | ||
diff --git a/tests/nonRegression/bug1682.sci b/tests/nonRegression/bug1682.sci deleted file mode 100644 index d227f4d..0000000 --- a/tests/nonRegression/bug1682.sci +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1682 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1682 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // Scilab 4.0 RC1 under Windows XP | ||
8 | // The field Figure.rotation_style="multiple" does not work correctly. | ||
9 | // | ||
10 | // The rotation of the axes of the first system by the change of the field | ||
11 | // Axes.rotation_angles does not force the rotation of the second one. | ||
12 | // | ||
13 | // When making a manual rotation, it works. | ||
14 | // | ||
15 | // Jacques-Deric | ||
16 | |||
17 | |||
18 | // Copyright INRIA | ||
19 | // Scilab Project - Jean-Baptiste Silvy | ||
20 | // Copyright INRIA 2006 | ||
21 | // Date : 11 janvier 2006 | ||
22 | |||
23 | // Program Spas42151A | ||
24 | // Designed for Scilab 3.1 & 4.0 | ||
25 | // Copyright Jacques-Deric Rouault, CNRS, INRIA | ||
26 | |||
27 | disp ("4.21.51A"); | ||
28 | hf = scf (1); | ||
29 | hf.figure_name = "4.21.51A"; | ||
30 | hf.background = 32; | ||
31 | hf.rotation_style = "multiple"; | ||
32 | |||
33 | subplot (1, 2, 1); | ||
34 | xfrect (0, 1, 1, 1); | ||
35 | hr1 = gce (); | ||
36 | hr1.background = 2; | ||
37 | hr1.fill_mode = "on"; | ||
38 | ha1 = hr1.parent; // get the axes | ||
39 | |||
40 | subplot (1, 2, 2); | ||
41 | xfrect (0, 1, 1, 1); | ||
42 | hr2 = gce (); | ||
43 | hr2.background = 3; | ||
44 | hr2.fill_mode = "on"; | ||
45 | ha2=hr2.parent; // get the axes | ||
46 | |||
47 | newAngles = [60,200] ; | ||
48 | ha1.rotation_angles = newAngles ; | ||
49 | |||
50 | // check if both axes are turned | ||
51 | if ( (ha1.rotation_angles == newAngles) & (ha2.rotation_angles == newAngles) ) then | ||
52 | affich_result(%T,1682); | ||
53 | else | ||
54 | affich_result(%F,1682); | ||
55 | end | ||
diff --git a/tests/nonRegression/bug1684.sci b/tests/nonRegression/bug1684.sci deleted file mode 100644 index 34ebaf7..0000000 --- a/tests/nonRegression/bug1684.sci +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1684 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1684 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // I can't compute the following expression: | ||
8 | // A = 1 + -2; | ||
9 | // I need to enter A = 1 + (-2); | ||
10 | // I've got a program which generates automaticaly matlab scripts with this kind of | ||
11 | // expressions and I don't want to change it to test is the value is negative and | ||
12 | // then add parenthesis. | ||
13 | |||
14 | // Copyright INRIA | ||
15 | // Scilab Project - Serge Steer | ||
16 | // Copyright INRIA 2005 | ||
17 | // Date : 6 mars 2006 | ||
18 | |||
19 | a=1+-1; | ||
20 | ok1=a==0; | ||
21 | a=1-+1; | ||
22 | ok2=a==0; | ||
23 | a=1++1; | ||
24 | ok3=a==2; | ||
25 | a=1--1; | ||
26 | ok4=a==2; | ||
27 | a=1*-1; | ||
28 | ok5=a==-1; | ||
29 | a=1*+1; | ||
30 | ok6=a==1; | ||
31 | a=2*+++--2; | ||
32 | ok7=a==4; | ||
33 | |||
34 | a=3+-1*+++--2; | ||
35 | ok8=a==1; | ||
36 | |||
37 | affich_result(ok1&ok2&ok3&ok4&ok5&ok6&ok7&ok8,1684); | ||
38 | clear | ||
diff --git a/tests/nonRegression/bug1693.sci b/tests/nonRegression/bug1693.sci deleted file mode 100644 index 3d586db..0000000 --- a/tests/nonRegression/bug1693.sci +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1693 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1693 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // cd \ throws an error | ||
8 | // | ||
9 | // -->cd \ | ||
10 | // !--error 998 | ||
11 | // Can't go to directory \ | ||
12 | // at line 6 of function cd called by : | ||
13 | // cd \ | ||
14 | // | ||
15 | // In scilab-3.1.1, it works | ||
16 | // | ||
17 | // -->cd \ | ||
18 | // ans = | ||
19 | // | ||
20 | // C:\ | ||
21 | // | ||
22 | // This was reported on the newsgroup: | ||
23 | // http://groups.google.fr/group/comp.soft- | ||
24 | // sys.math.scilab/browse_thread/thread/3e2f8a72af0148fd/e0f7866780de7fbf | ||
25 | // | ||
26 | // Since the Windows command interpreter accepts this (cd \ changes | ||
27 | // ... | ||
28 | |||
29 | // Copyright INRIA | ||
30 | // Scilab Project - Pierre MARECHAL | ||
31 | // Copyright INRIA 2005 | ||
32 | // Date : 28 décembre 2005 | ||
33 | |||
34 | // ================== Test 1 ================== | ||
35 | |||
36 | cd \ | ||
37 | |||
38 | if MSDOS | ||
39 | if pwd() <> 'C:\' then | ||
40 | test1 = %F; | ||
41 | else | ||
42 | test1 = %T; | ||
43 | end | ||
44 | else | ||
45 | if pwd() <> '/' then | ||
46 | test1 = %F; | ||
47 | else | ||
48 | test1 = %T; | ||
49 | end | ||
50 | end | ||
51 | |||
52 | // ================== Test 2 ================== | ||
53 | |||
54 | cd home | ||
55 | |||
56 | if pwd() <> home then | ||
57 | test2 = %F; | ||
58 | else | ||
59 | test2 = %T; | ||
60 | end | ||
61 | |||
62 | // ================== Test 3 ================== | ||
63 | |||
64 | if MSDOS | ||
65 | cd WSCI | ||
66 | if pwd() <> WSCI then | ||
67 | test3 = %F; | ||
68 | else | ||
69 | test3 = %T; | ||
70 | end | ||
71 | else | ||
72 | test3 = %T; | ||
73 | end | ||
74 | |||
75 | // ================== Test 4 ================== | ||
76 | |||
77 | cd SCIHOME | ||
78 | |||
79 | if pwd() <> SCIHOME then | ||
80 | test4 = %F; | ||
81 | else | ||
82 | test4 = %T; | ||
83 | end | ||
84 | |||
85 | // ================== Test 5 ================== | ||
86 | |||
87 | cd SCIHOME | ||
88 | |||
89 | if pwd() <> SCIHOME then | ||
90 | test5 = %F; | ||
91 | else | ||
92 | test5 = %T; | ||
93 | end | ||
94 | |||
95 | // ================== Test 6 ================== | ||
96 | |||
97 | cd PWD | ||
98 | |||
99 | if pwd() <> PWD then | ||
100 | test6 = %F; | ||
101 | else | ||
102 | test6 = %T; | ||
103 | end | ||
104 | |||
105 | // ================== Result ================== | ||
106 | |||
107 | if ( test1 & test2 & test3 & test4 & test5 & test6 ) then | ||
108 | affich_result(%T,1693); | ||
109 | else | ||
110 | affich_result(%F,1693); | ||
111 | end | ||
diff --git a/tests/nonRegression/bug1711.sci b/tests/nonRegression/bug1711.sci deleted file mode 100644 index 76083d6..0000000 --- a/tests/nonRegression/bug1711.sci +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1711 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1711 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // datenum() produces incorrect results. For example: | ||
8 | // | ||
9 | // -->datenum(2006,1,4) | ||
10 | // ans = | ||
11 | // | ||
12 | // 4.5 | ||
13 | // | ||
14 | // -->datenum() | ||
15 | // ans = | ||
16 | // | ||
17 | // 4.8753166 | ||
18 | // | ||
19 | // -->datevec(datenum()) | ||
20 | // ans = | ||
21 | // | ||
22 | // - 1. 13. 4. 21. 0. 27.783333 | ||
23 | |||
24 | // Copyright INRIA | ||
25 | // Scilab Project - Pierre MARECHAL | ||
26 | // Copyright INRIA 2005 | ||
27 | // Date : 28 décembre 2005 | ||
28 | |||
29 | test1 = ( datenum(2006,1,4) == 732681 ); | ||
30 | |||
31 | if test1 then | ||
32 | affich_result(%T,1711); | ||
33 | else | ||
34 | affich_result(%F,1711); | ||
35 | end | ||
diff --git a/tests/nonRegression/bug1712.sci b/tests/nonRegression/bug1712.sci deleted file mode 100644 index 91ae4e7..0000000 --- a/tests/nonRegression/bug1712.sci +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1712 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1712 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // Logical binary operations &,| with hypermatrices fail, as shown in the | ||
8 | // following examples. (The unary operation ~ succeeds.) | ||
9 | // | ||
10 | // -->hm=hypermat([2 2 2],1:8) | ||
11 | // | ||
12 | // -->hm>min(hm) & hm<max(hm) | ||
13 | // !--error 4 | ||
14 | // undefined variable : %l_h_l | ||
15 | // | ||
16 | // -->hm==min(hm) | hm==max(hm) | ||
17 | // !--error 4 | ||
18 | // undefined variable : %l_g_l | ||
19 | // | ||
20 | // -->~(hm==min(hm)) | ||
21 | // ans = | ||
22 | // | ||
23 | // (:,:,1) | ||
24 | // | ||
25 | // ! F T ! | ||
26 | // ! T T ! | ||
27 | // ... | ||
28 | |||
29 | // Copyright INRIA | ||
30 | // Scilab Project - Pierre MARECHAL | ||
31 | // Copyright INRIA 2005 | ||
32 | // Date : 6 fevrier 2005 | ||
33 | |||
34 | hm=hypermat([2 2 2],1:8); | ||
35 | test1 = execstr('hm>min(hm) & hm<max(hm)','errcatch'); | ||
36 | test2 = execstr('hm==min(hm) | hm==max(hm)','errcatch'); | ||
37 | |||
38 | if( (test1 == 0) & (test2 == 0) ) then | ||
39 | affich_result(%T,1712); | ||
40 | else | ||
41 | affich_result(%F,1712); | ||
42 | end | ||
diff --git a/tests/nonRegression/bug1720.sci b/tests/nonRegression/bug1720.sci deleted file mode 100644 index 663b816..0000000 --- a/tests/nonRegression/bug1720.sci +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1720 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1720 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // Scilab 4.0-RC1 | ||
8 | // Different default behavior of xfrect and xfarc | ||
9 | // xfrec does not draw the limit of the rectangle | ||
10 | // xfarc draws the limit of the circle | ||
11 | // | ||
12 | // I don't know which is right and which is wrong, but there is an obvious | ||
13 | // inconsistency between the two behaviors | ||
14 | // | ||
15 | // Jacques-Deric | ||
16 | |||
17 | // Copyright INRIA | ||
18 | // Scilab Project - Jean-Baptiste Silvy | ||
19 | // Copyright INRIA 2006 | ||
20 | // Date : 11 janvier 2006 | ||
21 | |||
22 | hf = scf(1) ; | ||
23 | hf.figure_name = "4.13.22A1"; | ||
24 | ha = hf.children; | ||
25 | ha.axes_visible = "on"; | ||
26 | ha.box = "on"; | ||
27 | xfrect (0,0.5,0.5,0.5); | ||
28 | hr = gce(); | ||
29 | hr.background = 5; | ||
30 | xfarc (0.5,1,0.5,0.5,0,23040); | ||
31 | hc = gce(); | ||
32 | hc.background = 6; | ||
33 | |||
34 | // check that xfarc fill the arc and don't draw the limit | ||
35 | if ( hc.line_mode == 'off' ) then | ||
36 | affich_result(%T,1720); | ||
37 | else | ||
38 | affich_result(%F,1720); | ||
39 | end | ||
diff --git a/tests/nonRegression/bug1725.sci b/tests/nonRegression/bug1725.sci deleted file mode 100644 index 688d1bc..0000000 --- a/tests/nonRegression/bug1725.sci +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1725 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1725 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // the function mtlb_axis returns an index error when called with an | ||
8 | // argument of [ 1 500 -22.3 1.4] or any other argument. | ||
9 | // | ||
10 | // This was traced to varargout(1) not being set to a.data_bounds within | ||
11 | // the code segment | ||
12 | // if rhs>0 then | ||
13 | // | ||
14 | // statements | ||
15 | // | ||
16 | // else// v = axis | ||
17 | // else | ||
18 | // varargout(1)=a.data_bounds; | ||
19 | // end | ||
20 | // endfunction | ||
21 | // | ||
22 | // Changing this to | ||
23 | // if rhs>0 then | ||
24 | // | ||
25 | // statements | ||
26 | // varargout(1)=a.data_bounds; | ||
27 | // ... | ||
28 | |||
29 | |||
30 | // Copyright INRIA | ||
31 | // Scilab Project - Farid Belahcene | ||
32 | // Copyright INRIA 2005 | ||
33 | // Date : 09 janvier 2006 | ||
34 | |||
35 | a = mtlb_axis([ 1 500 -22.3 1.4]) | ||
36 | test1 = ( a == [1 500 -22.3 1.4] ) | ||
37 | |||
38 | if ( test1 ) then | ||
39 | affich_result(%T,1725); | ||
40 | else | ||
41 | affich_result(%F,1725); | ||
42 | end | ||
diff --git a/tests/nonRegression/bug1732.sci b/tests/nonRegression/bug1732.sci deleted file mode 100644 index 66d5a96..0000000 --- a/tests/nonRegression/bug1732.sci +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1732 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1732 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // The field Axes.sub_tics does not correctly works under Linux, but correctly | ||
8 | // works un Windows. | ||
9 | // | ||
10 | // Jacques-Deric | ||
11 | |||
12 | // Copyright INRIA | ||
13 | // Scilab Project - Jean-Baptiste Silvy | ||
14 | // Copyright INRIA 2006 | ||
15 | // Date : 18 janvier 2006 | ||
16 | |||
17 | ref = [1,0,5] ; | ||
18 | |||
19 | ha = gca () ; | ||
20 | ha.axes_visible="on" ; | ||
21 | ha.view = "3d" ; | ||
22 | ha.sub_ticks = ref ; | ||
23 | res1 = ha.sub_ticks ; | ||
24 | |||
25 | // mask Z axis | ||
26 | ha.rotation_angles = [1,30]; | ||
27 | res2 = ha.sub_ticks ; | ||
28 | |||
29 | |||
30 | // check the sub_ticks were not modified | ||
31 | if ( res1 == ref & res2 == ref ) then | ||
32 | affich_result(%T,1732); | ||
33 | else | ||
34 | affich_result(%F,1732); | ||
35 | end | ||
diff --git a/tests/nonRegression/bug1736.sci b/tests/nonRegression/bug1736.sci deleted file mode 100644 index 7252c64..0000000 --- a/tests/nonRegression/bug1736.sci +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1736 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1736 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // Actually this is the same bug as 608, but it has been | ||
8 | // marked incorrectly as RESOLVED. The fix should be the | ||
9 | // same I posted some years ago for version 2.7 and I'm | ||
10 | // surprised it hasn't be applied a lot of years after it | ||
11 | // has been indentified and posted a bug correction... There | ||
12 | // is a problem with uint8 comparisons... | ||
13 | |||
14 | // Copyright INRIA | ||
15 | // Scilab Project - Serge Steer | ||
16 | // Copyright INRIA 2006 | ||
17 | // Date : 11 janvier 2006 | ||
18 | |||
19 | a = uint8(rand(10,10)*100); | ||
20 | ok=(a<=50)==(50>=a) | ||
21 | affich_result(ok,1736); | ||
diff --git a/tests/nonRegression/bug1742.sci b/tests/nonRegression/bug1742.sci deleted file mode 100644 index cf5bb5e..0000000 --- a/tests/nonRegression/bug1742.sci +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1742 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1742 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // function [m]=msd(x,orien) | ||
8 | // //This function computes the mean squared deviation of the values of a | ||
9 | // //vector or matrix x. | ||
10 | // | ||
11 | // elseif orien=='r'|orien==1 then | ||
12 | // m=sqrt(sum((x-ones(x(:,1))*mean(x,'r')).^2,'r')/ncol); | ||
13 | // | ||
14 | // This formula is wrong. Must be canged in: | ||
15 | // m=sqrt(sum((x-ones(x(:,1))*mean(x,'r')).^2,'r')/nrow); | ||
16 | |||
17 | // Copyright INRIA | ||
18 | // Scilab Project - Serge Steer | ||
19 | // Copyright INRIA 2006 | ||
20 | // Date : 4 mai 2006 | ||
21 | |||
22 | x=matrix([5 2:8],2,4); | ||
23 | r=(msd(x)-3.5)<%eps | ||
24 | r=r&norm(msd(x,1)-[3 1 1 1]/2)<%eps | ||
25 | r=r&norm(msd(x,'r')-[3 1 1 1]/2)<%eps | ||
26 | r=r&norm(msd(x,2)-sqrt([2;5]))<%eps | ||
27 | r=r&norm(msd(x,'c')-sqrt([2;5]))<%eps | ||
28 | |||
29 | affich_result(r,1742); | ||
diff --git a/tests/nonRegression/bug1768.sci b/tests/nonRegression/bug1768.sci deleted file mode 100644 index 48e48a5..0000000 --- a/tests/nonRegression/bug1768.sci +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1768 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1768 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // I just downloaded Scilab-4.0rc1. | ||
8 | // Whenever I write a new function and try to write the relative help | ||
9 | // file, xmltohtml crashes. Apparently, it does not found the whatis file | ||
10 | // even if it was just created successfully | ||
11 | |||
12 | // Copyright INRIA | ||
13 | // Scilab Project - Serge Steer | ||
14 | // Copyright INRIA 2005 | ||
15 | // Date : 20 janvier 2006 | ||
16 | |||
17 | function y=foo1(a,b) | ||
18 | y=a+b | ||
19 | endfunction | ||
20 | T=help_skeleton('foo1') | ||
21 | mputl(strsubst(T,'<LINK> add a key here</LINK>','<LINK>abs</LINK>'), ... | ||
22 | TMPDIR+'/foo1.xml') | ||
23 | ok=%t | ||
24 | try | ||
25 | xmltohtml(TMPDIR) | ||
26 | catch | ||
27 | ok=%f | ||
28 | end | ||
29 | if ok | ||
30 | try | ||
31 | xmltohtml('SCI/modules/elementaries_functions/help/'+getlanguage()) | ||
32 | catch | ||
33 | ok=%f | ||
34 | end | ||
35 | end | ||
36 | affich_result(ok,1768); | ||
diff --git a/tests/nonRegression/bug1772.sci b/tests/nonRegression/bug1772.sci deleted file mode 100644 index 6347504..0000000 --- a/tests/nonRegression/bug1772.sci +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | // <-- Non-regression test for bug 1772 --> | ||
2 | // | ||
3 | // <-- Bugzilla URL --> | ||
4 | // http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1772 | ||
5 | // | ||
6 | // <-- Short Description --> | ||
7 | // There is a problem while inserting an object of type list in an undefined struct | ||
8 | // field | ||
9 | |||
10 | // Copyright INRIA | ||
11 | // Scilab Project - Serge Steer | ||
12 | // Copyright INRIA 2005 | ||
13 | // Date : 20 janvier 2006 | ||
14 | |||
15 | S.x=1; | ||
16 | ok=%t | ||
17 | try | ||
18 | S.y.z=list() | ||
19 | catch | ||
20 | ok=%f | ||
21 | end | ||
22 | if ok then ok=S.y.z==list(),end | ||
23 | affich_result(ok,1772); | ||