[cacsd] fix some tests: zpk.. 64/20764/2
Samuel GOUGEON [Wed, 30 Jan 2019 01:25:07 +0000 (02:25 +0100)]
Change-Id: I1806a58ae3a2dcbadebfc0ce6a85f5f4ce4d326a

scilab/modules/cacsd/tests/unit_tests/zpk.dia.ref
scilab/modules/cacsd/tests/unit_tests/zpk.tst

index 056e453..9555410 100644 (file)
@@ -207,7 +207,9 @@ assert_checktrue(S2.P{1}==P);
 assert_checkalmostequal(S2.K,K);
 assert_checktrue((S*S)(1,1)==S2);
 S2=S(2,:)*S(:,1);
-Z=[1;0.3;-1.7226779397091;
+Z=[1;
+0.3;
+-1.7226779397091;
 -3.6386610301454+%i*1.6503526090746;
 -3.6386610301454-%i*1.6503526090746];
 P=[-2;-3+%i*2;-3+%i*2;-3;-3-%i*2;-3-%i*2];
@@ -308,7 +310,7 @@ assert_checktrue(S/Sh1==S*zpk(1,[],-1,"c"));
 assert_checktrue(Sh1\S==S*zpk(1,[],-1,"c"));
 s1=minss(S/S);
 assert_checktrue(s1.A==[]&s1.B==[]&s1.C==[]);
-assert_checkalmostequal(s1.D,eye(2,2),1e-10,1e-10);
+assert_checkalmostequal(clean(s1.D),eye(2,2)+0*%s,1e-10,1e-10);
 s1=minss(S\S);
 assert_checktrue(s1.A==[]&s1.B==[]&s1.C==[]);
 assert_checkalmostequal(s1.D,eye(2,2),1e-10,1e-10);
index 8e5febd..1e53fd1 100644 (file)
@@ -239,7 +239,9 @@ assert_checktrue(S2.P{1}==P);
 assert_checkalmostequal(S2.K,K);
 assert_checktrue((S*S)(1,1)==S2);
 S2=S(2,:)*S(:,1);
-Z=[1;0.3;-1.7226779397091;
+Z=[1;
+0.3;
+-1.7226779397091;
 -3.6386610301454+%i*1.6503526090746;
 -3.6386610301454-%i*1.6503526090746];
 P=[-2;-3+%i*2;-3+%i*2;-3;-3-%i*2;-3-%i*2];
@@ -361,7 +363,7 @@ assert_checktrue(Sh1\S==S*zpk(1,[],-1,"c"));
 
 s1=minss(S/S);
 assert_checktrue(s1.A==[]&s1.B==[]&s1.C==[]);
-assert_checkalmostequal(s1.D,eye(2,2),1e-10,1e-10);
+assert_checkalmostequal(clean(s1.D),eye(2,2)+0*%s,1e-10,1e-10);
 s1=minss(S\S);
 assert_checktrue(s1.A==[]&s1.B==[]&s1.C==[]);
 assert_checkalmostequal(s1.D,eye(2,2),1e-10,1e-10);