[elementary_functions] fix test 03/21303/2
Adeline CARNIS [Tue, 11 Feb 2020 10:23:43 +0000 (11:23 +0100)]
test_run("elementary_functions", ["bug_426", "bug_3735", "clean",
"conj"])

Change-Id: I15aca5fd0ac919cb6a463b6c514a2c43e3507671

scilab/modules/elementary_functions/tests/nonreg_tests/bug_3735.dia.ref
scilab/modules/elementary_functions/tests/nonreg_tests/bug_426.dia.ref
scilab/modules/elementary_functions/tests/unit_tests/clean.tst
scilab/modules/elementary_functions/tests/unit_tests/conj.dia.ref
scilab/modules/elementary_functions/tests/unit_tests/conj.tst

index 5120866..0d29372 100644 (file)
@@ -13,11 +13,8 @@ A = ["First Row";"Second Row"];
 B = ["Third Row";"Fourth Row"];
 result = cat(1,A,B)
  result  = 
-!First Row   !
-!            !
-!Second Row  !
-!            !
-!Third Row   !
-!            !
-!Fourth Row  !
+  "First Row" 
+  "Second Row"
+  "Third Row" 
+  "Fourth Row"
 if result <> ["First Row";"Second Row";"Third Row";"Fourth Row"] then bugmes();quit;end
index 66f6ed2..3fa4730 100644 (file)
@@ -16,17 +16,12 @@ a = ['aaa';'eee';'ccc';'bbb';'ddd';'rrr'];
 trueValue=[1; 4; 3; 5; 2; 6];
 [b result] = gsort(a,'r','i')
  b  = 
-!aaa  !
-!     !
-!bbb  !
-!     !
-!ccc  !
-!     !
-!ddd  !
-!     !
-!eee  !
-!     !
-!rrr  !
+  "aaa"
+  "bbb"
+  "ccc"
+  "ddd"
+  "eee"
+  "rrr"
  result  = 
    1.
    4.
index 406bacc..0ab1814 100644 (file)
@@ -15,7 +15,7 @@ small = 1;
 a1 = [small big];
 b1 = [0 big];
 a2 = [complex(small,small) big];
-b2 = [0 big];
+b2 = [complex(0,0) big];
 a3 = [complex(0,big) small complex(big,small)];
 b3 = [complex(0,big) 0 big];
 //double
@@ -39,7 +39,7 @@ epsR = 1e-2;
 a1 = [big small];
 b1 = [big 0];
 a2 = [big complex(small,small)];
-b2 = [big 0];
+b2 = [big complex(0,0)];
 a3 = [complex(0,big) small complex(big,small)];
 b3 = [complex(0,big) 0 big];
 //double
@@ -61,7 +61,7 @@ assert_checkequal(clean(sparse(a1),epsA),sparse(a1));
 assert_checkequal(clean(sparse(a2),epsA),sparse(a2));
 assert_checkequal(clean(sparse(a3),epsA),sparse(a3));
 assert_checkequal(clean(sparse(a1),epsA,epsR),sparse(b1));
-assert_checkequal(clean(sparse(a2),epsA,epsR),sparse(b2));
+assert_checkequal(clean(sparse(a2),epsA,epsR), sparse(b2));
 assert_checkequal(clean(sparse(a3),epsA,epsR),sparse(b3));
 
 
index 3b3bc45..e2481a3 100644 (file)
@@ -26,7 +26,7 @@ assert_checkequal(conj(c_d), 1-2*%i);
 assert_checkequal(conj(A), [1-2*%i, 3-2*%i; 0, 0]);
 assert_checkequal(conj(spA), sparse(conj(A)));
 assert_checkequal(conj(diag(A)), [1-2*%i; 0]);
-assert_checkequal(conj(speye(4,4)), speye(4,4));
+assert_checkequal(conj(speye(4,4)), speye(4,4)+spzeros(4,4)*%i);
 assert_checkequal(conj(1+s+%i), 1+s-%i);
 // conj(rational)
 rr = (2-s)^2/(-1+2*s)^3;
index f46874c..140cecf 100644 (file)
@@ -28,7 +28,7 @@ assert_checkequal(conj(c_d), 1-2*%i);
 assert_checkequal(conj(A), [1-2*%i, 3-2*%i; 0, 0]);
 assert_checkequal(conj(spA), sparse(conj(A)));
 assert_checkequal(conj(diag(A)), [1-2*%i; 0]);
-assert_checkequal(conj(speye(4,4)), speye(4,4));
+assert_checkequal(conj(speye(4,4)), speye(4,4)+spzeros(4,4)*%i);
 assert_checkequal(conj(1+s+%i), 1+s-%i);
 // conj(rational)
 rr = (2-s)^2/(-1+2*s)^3;