gap> 
gap> 
gap> # Start
gap> 
gap> START_TEST( "Test of the 'if' package" );
gap> SizeScreen([80]);;
gap> 
gap> 
gap> 
gap> IF_Interface(IF_mathematica, "GCD", [1000, 360] );
40
gap> 
gap> 
gap> # Atomic Objects
gap> 
gap> # String
gap> 
gap> IF_Interface( IF_mathematica, "Identity", ["ciao"] );
"ciao"
gap> IF_Interface( IF_mathematica, "Identity", ["a\"b\\c"] );
"a\"b\\c"
gap> 
gap> 
gap> # Integer
gap> 
gap> l := [-11^90, -1, 0, 1, 10^200];;
gap> List(l, x->IF_Type(IF_mathematica, x));
[ "Integer", "Integer", "Integer", "Integer", "Integer" ]
gap> l=List(l, x-> IF_Interface(IF_mathematica, "Identity", [x]));
true
gap> 
gap> 
gap> # Rational
gap> 
gap> c:=Enumerator(Rationals);
<enumerator of Rationals>
gap> for i in [1..20] do
>   if not c[i]=IF_Interface(IF_mathematica, "Identity", [c[i]] ) then
>     Print( c[i], " ", fail, "\n");
>   fi;
> od;
gap> IF_Interface(IF_mathematica, "Identity", [-10^300/3]) = -10^300/3;
true
gap> 
gap> 
gap> # Complex
gap> 
gap> IF_Interface(IF_mathematica, "Identity", [E(4)] );
E(4)
gap> IF_Interface(IF_mathematica, "Identity", [3/5+7/11*E(4)] );
3/5+7/11*E(4)
gap> 
gap> c:=Enumerator(GaussianRationals);
<enumerator of GaussianRationals>
gap> for i in [1..50] do
>   if not c[i]=IF_Interface(IF_mathematica, "Identity", [c[i]] ) then
>     Print( c[i], " ", fail, "\n");
>   fi;
> od;
gap> 
gap> 
gap> # Non-atomic Objects
gap> 
gap> # List
gap> 
gap> IF_Interface(IF_mathematica, "Identity", [[11,22,33]]);
[ 11, 22, 33 ]
gap> IF_Interface(IF_mathematica, "Length", [[11,22,33]]);
3
gap> IF_Interface(IF_mathematica, "Reverse", [[11,22,33]]);
[ 33, 22, 11 ]
gap> 
gap> 
gap> # end of test file
gap> 
gap> STOP_TEST( "test", 10000 );
Test of the 'if' package
GAP4stones: 5
gap> 
