# This is the source of the test file. The test file is produced by:
# gap4r4 init.g ../if_local < tst/yacas.src # on Medicis
# gap_dev init.g < tst/yacas.src # on my pc
# remove the line 'gap> LogTo();' at the end of the generated file.


LogTo("tst/yacas.tst");


# Start

START_TEST( "Test of the 'if' package" );
SizeScreen([80]);;

LoadPackage("openmath");


IF_Interface(IF_yacas, "Gcd", [1000, 360] );


# the conversion using OpenMath is tested

#I  Searching Method for OMPut with 2 arguments:
#I  Total: 16 entries
#I  Method 1: ``OMPut: for a range'', value: 40

IF_Interface(IF_yacas, "", [ [3..10] ] );


#I  Method 2: ``OMPut: for a matrix'', value: 32

IF_Interface(IF_yacas, "", [ [[11,12],[21,22]] ] );


#I  Method 3: ``OMPut: for a character table'', value: 23
#I  Method 4: ``OMPut: for a group'', value: 23
#I  Method 5: ``OMPut: for an integer'', value: 20

IF_Interface(IF_yacas, "", [ 10^72 ] );
IF_Interface(IF_yacas, "", [ 10^3930 ] )=10^3930; # longer number are apparently not supported


#I  Method 6: ``OMPut: for a rational'', value: 19

IF_Interface(IF_yacas, "", [ 10/72 ] );


#I  Method 7: ``OMPut: for infinity'', value: 18

IF_Interface(IF_yacas, "", [ infinity ] );


#I  Method 8: ``OMPut: for a proper cyclotomic'', value: 18

IF_Interface(IF_yacas, "", [ 2/3+5/4*E(4) ] );


#I  Method 9: ``OMPut: for a row vector'', value: 14

IF_Interface(IF_yacas, "", [ [1,2,3] ] );


#I  Method 10: ``OMPut: for a hasse diagram'', value: 13
#I  Method 11: ``OMPut: for a set'', value: 10

IF_Interface(IF_yacas, "", [ [] ] );
IF_Interface(IF_yacas, "", [ Set([true,false]) ] );

#I  Method 12: ``OMPut: for a permutation'', value: 10
#I  Method 13: ``OMPut: for a string'', value: 7

## IF_Interface(IF_yacas, "", [ "ciao" ] );
## IF_Interface(IF_yacas, "", [ "" ] );
## IF_Interface(IF_yacas, "", [ "&" ] );
## IF_Interface(IF_yacas, "", [ "<" ] );
## IF_Interface(IF_yacas, "", [ "<&>\"'" ] );
## IF_Interface(IF_yacas, "", [ "&lt;&amp;" ] );


#I  Method 14: ``OMPut: for a function'', value: 3
#I  Method 15: ``OMPut: for a boolean'', value: 3

IF_Interface(IF_yacas, "", [ false ] );


#I  Method 16: ``OMPut: for a list or collection'', value: 3

IF_Interface(IF_yacas, "", [ [ false, true, infinity, 1, 0 ] ] );



# end of test file

STOP_TEST( "test", 10000 );

LogTo();
quit;

