[overloading, cacsd] fix regressions after 639afd36
[scilab.git] / scilab / modules / overloading / tests / unit_tests / rational.tst
index 3b438a5..b963e1f 100644 (file)
@@ -5,7 +5,8 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 // <-- CLI SHELL MODE -->
-
+// <-- NO CHECK REF -->
+//
 
 s=poly(0,"s");
 z = s^0;
@@ -334,6 +335,18 @@ assert_checkequal(H, [(h+1)/h ((h+1)*(h-1))/h]);
 H=[3 h;s 2]./[3 h;s 2];
 assert_checkequal(coeff(H.num)./coeff(H.den), ones(2,2));
 
+//comparison
+//---------------
+assert_checktrue(rlist(1,0)==%inf)
+assert_checktrue(%inf==rlist(1,0))
+assert_checktrue(poly(%inf,"x","coeff")==rlist(1,0))
+assert_checktrue(rlist(1,0)==poly(%inf,"x","coeff"))
+assert_checkfalse(rlist(1,0)<>%inf)
+assert_checkfalse(%inf<>rlist(1,0))
+assert_checkfalse(poly(%inf,"x","coeff")<>rlist(1,0))
+assert_checkfalse(rlist(1,0)<>poly(%inf,"x","coeff"))
+
+
 // hypermatrices of rationnals
 
 clear H;H(1,1,2)=h;