gap> 
gap> 
gap> # Start
gap> 
gap> START_TEST( "Test of the 'if' package" );
gap> SizeScreen([80]);;
gap> 
gap> 
gap> IF_Interface(IF_mupad, "gcd", [1000, 360] );
40
gap> IF_Interface(IF_mupad, "combinat::partitions::list", [4]);
[ [ 4 ], [ 3, 1 ], [ 2, 2 ], [ 2, 1, 1 ], [ 1, 1, 1, 1 ] ]
gap> IF_Interface(IF_mupad, "combinat::tableaux::list", [[4,2]]);
[ [ [ 5, 6 ], [ 1, 2, 3, 4 ] ], [ [ 4, 6 ], [ 1, 2, 3, 5 ] ], 
  [ [ 3, 6 ], [ 1, 2, 4, 5 ] ], [ [ 2, 6 ], [ 1, 3, 4, 5 ] ], 
  [ [ 4, 5 ], [ 1, 2, 3, 6 ] ], [ [ 3, 5 ], [ 1, 2, 4, 6 ] ], 
  [ [ 2, 5 ], [ 1, 3, 4, 6 ] ], [ [ 3, 4 ], [ 1, 2, 5, 6 ] ], 
  [ [ 2, 4 ], [ 1, 3, 5, 6 ] ] ]
gap> 
gap> 
gap> # DOM_BOOL
gap> 
gap> IF_Interface(IF_mupad, "", [true] );
true
gap> 
gap> 
gap> # DOM_FAIL
gap> 
gap> IF_Interface(IF_mupad, "", [fail] );
fail
gap> 
gap> 
gap> # DOM_INT
gap> 
gap> l := [-3^30, -1, 0, 1, 3^70];;
gap> List(l, x->IF_Type(IF_mupad, x));
[ "DOM_INT", "DOM_INT", "DOM_INT", "DOM_INT", "DOM_INT" ]
gap> l=List(l, x-> IF_Interface(IF_mupad, "", [x]));
true
gap> 
gap> 
gap> # DOM_RAT
gap> 
gap> c:=Enumerator(Rationals);
<enumerator of Rationals>
gap> for i in [1..20] do
>   if not c[i]=IF_Interface(IF_mupad, "", [c[i]] ) then
>     Print( c[i], " ", fail, "\n");
>   fi;
> od;
gap> 
gap> 
gap> # DOM_STRING
gap> 
gap> l := Difference([0..255], IF_PROHIBITED_CHARS[IF_mupad]);;
gap> l1:= List( l{[1..110]}, CHAR_INT);;
gap> l2:= List( l{[110..Length(l)]}, CHAR_INT);;
gap> for i in [l1,l2] do
>     ConvertToStringRep( i );
>     if not i=IF_Interface(IF_mupad, "", [i]) then
>         Print( "different strings!\n" );
>     fi;
> od;
gap> 
gap> 
gap> # DOM_COMPLEX
gap> 
gap> Print( "imaginary unit ", IF_Interface(IF_mupad, "", [E(4)] ), "\n" );
imaginary unit E(4)
gap> c:=Enumerator(GaussianRationals);
<enumerator of GaussianRationals>
gap> for i in [1..50] do
>   if not c[i]=IF_Interface(IF_mupad, "", [c[i]] ) then
>     Print( i, " ", c[i], " ", fail, "\n");
>   fi;
> od;
gap> 
gap> 
gap> # DOM_LIST
gap> 
gap> l:=[ [ 2 .. 5 ], 53, "ciao", [ 1, 2, 4 ], 33/4 ];;
gap> l=IF_Interface(IF_mupad, "", [l] );
true
gap> []=IF_Interface(IF_mupad, "", [[]]); # empty list
true
gap> 
gap> 
gap> # DOM_SET
gap> 
gap> Set(IF_Interface(IF_mupad, "", "{11,22,33}")) = [ 11, 22, 33 ];
true
gap> 
gap> 
gap> # end of test file
gap> 
gap> STOP_TEST( "test", 10000 );
Test of the 'if' package
GAP4stones: 17
gap> 
