""
(test0000=(2+3 *5==2+3*5)&(2 + 3 * 5==2+3*5))?"Test 00.00: parser    ok":"Test 00.00: parser    failed"
test00=test0000;

(test0100=2+3*5==17)?"Test 01.00: integer   ok":"Test 01.00: integer   failed"
f(x)=sin(x)+(x*x);
(test0101=(2^4==16)&(2^(-4)==1/16)&((-2)^4==16)&((-2)^(-4)==1/16)&((-2)^(-3)==-1/8))?"Test 01.01: power     ok":"Test 01.01: power     failed"
test01=test0100&test0101;

(test0200=abs(f(2)-4.9093)<0.01)?"Test 02.00: double    ok":"Test 02.00: double    failed"
opi=pi;
pi=4*atan(1);e=exp(1);i=complex(0,1);
(test0201=abs(sin(pi/2)-1)<0.01)?"Test 02.01: sine      ok":"Test 02.01: sine      failed"
(test0202=abs(log(e^2.0)-2)<0.01)?"Test 02.02: log       ok":"Test 02.02: log       failed"
test02=test0200&test0201&test0202;
pi=opi;opi=0;

(test0300=f("a")=="sin(a)+(a)*(a)")?"Test 03.00: string    ok":"Test 03.00: string    failed"
test03=test0300;

(test0400=(1/[1 2.;3 4])==[-2 1;3/2 -1/2])?"Test 04.00: matrix    ok":"Test 04: matrix    failed"
(test0401=det[1 2 3;4 5 6;7 8 10]==-3)?"Test 04.01: det       ok":"Test 04.01: det       failed"
test04=test0400&test0401;

y=f(taylor[2 1 0 0]);
(test0500=((abs(y(1)-4.909297)<0.01)&(abs(y(2)-3.583853)<0.01)&(abs(y(3)-0.545351)<0.01)&(abs(y(4)-0.069358)<0.01)))?"Test 05.00: taylor    ok":"Test 05.00: taylor    failed"
(test0501=((abs((taylor[3 1 0 0]^4)(4)-12)<0.01)&(abs((taylor[1/16 1 0]^(1/2))(3)+8)<0.01)))?"Test 05.01: power     ok":"Test 05.01: power     failed"
(test0502=(abs(sqr(taylor[1 2 3])(3)-10)<0.01))?"Test 05.02: sqr       ok":"Test 05.02: sqr       failed"
(test0503=(((taylor[1 2 0]-taylor[1])(2)==2)&((taylor[1]-taylor[1 2 0])(2)==-2)))?"Test 05.03: dimension ok":"Test 05.03: dimension failed"
test05=test0500&test0501&test0502&test0503;

i=complex(0,1);
(test0600=(8+i)/(3+2*i)==complex(2,-1))?"Test 06.00: complex   ok":"Test 06.00: complex   failed"
(test0601=abs((-4)^.5-2*i)<0.01)?"Test 06.01: power     ok":"Test 06.01: power     failed"
test06=test0600&test0601;

ten(x)=x+x+x+x+x+x+x+x+x+x;
(test0700=ten(1/10)-1==0)?"Test 07.00: fraction  ok":"Test 07.00: fraction  failed"
test07=test0700;

(test0800=(20!+21!+22!)/(20!)==484)?"Test 08.00: longint   ok":"Test 08.00: longint   failed"
test08=test0800;

(test0900=(1/20!+21!+5-21!-1/20!)==5)?"Test 09.00: longfrac  ok":"Test 09.00: longfrac  failed"
test09=test0900;

(test1000=[1,2]*[-3,4]==[-6,8])?"Test 10.00: interval  ok":"Test 10.00: interval  failed"
(test1001=(([2,3]^3>=[8,27]) & ([2,3]^3<=[7.9,27.1])))?"Test 10.01: power     ok":"Test 10.01: power     failed"
test10=test1000 & test1001;

Stagprec(2);
(test1100=(LReal(1e+20)+1)-1e+20==1)?"Test 11.00: LReal     ok":"Test 11.00: LReal     failed"
(test1101=abs(LReal(2)^3-8)<0.01)?"Test 11.01: power     ok":"Test 11.01: power     failed"
test11=test1100 & test1101;

Stagprec(2);
(test1200=[1,2]+LInterval(1e+20)-1e+20==[1,2])?"Test 12.00: LInterval ok":"Test 12.00: LInterval failed"

Stagprec(5);
opi=pi;
pi=atan(LInterval(1,1))*4;
(test1201=((abs(mid(pi)-3.14159265)<0.01) & (diam(pi)<1e-50)))?"Test 12.01: atan      ok":"Test 12.01: atan      failed"
pi=opi;opi=0;
test12=test1200 & test1201;

X=poly("X");
(test1300=(X+1)^3==X*X*X+3*X^2+3*X+1)?"Test 13.00: poly      ok":"Test 13.00: poly      failed"
test13=test1300;

i=0;j=complex(0,1);A=[1 2 3;4 5 6;7 8 9+j];
(test10000=abs(det(A)+3*j)<0.01)?"Combined Test 100.00: complex determinant ok":"Combined Test 100.00: complex determinant failed"

B=A^10;
C=(1/A)^10;
(test10001=B*C==[1 0 0;0 1 0;0 0 1])?"Combined Test 100.01: longfrac matrices   ok":"Combined Test 100.01: longfrac matrices   failed"

y=0;for(x=4;x<100;x++) y=(y*3+x+77)&65535;
(test10002=y==26736)?"Combined Test 100.02: integer iteration   ok":"Combined Test 100.02: integer iteration   failed"

i=complex(0,1);
(test10003=(([i]*1.)(1)==i))?"Combined Test 100.03: complex matrix mult ok":"Combined Test 100.03: complex matrix mult failed"

i=complex(0,1);
(test10004=(([1]*i)(1)==i))?"Combined Test 100.04: matrix complex mult ok":"Combined Test 100.04: matrix complex mult failed"

i=complex(0,1);
(test10005=(([1]*taylor[1]*i==[taylor[i]]) & (i*[1]*taylor[1]==[taylor[i]]) & (taylor[1]*i*[1]==[taylor[i]]) & ([1]*i*taylor[1]==[taylor[i]]) & (i*taylor[1]*[1]==[taylor[i]]) & (taylor[1]*[1]*i==[taylor[i]])))?"Combined Test 100.05: gen. types predence ok":"Combined Test 100.05: gen. types predence failed"

test100=test10000&test10001&test10002&test10003&test10004&test10005;

""
"---------------------------------------------"
"---------------- Test Summary ---------------"
"---------------------------------------------"
""
version
""

lighttest=test00&test01&test02&test03&test04&test10002;
mediumtest=test00&test01&test02&test03&test04&test05&test06&test07&test13&test10000&test10003&test10002&test10004&test10005;
longtest=test00&test01&test02&test03&test04&test05&test06&test07&test08&test09&test13&test10000&test10001&test10002&test10003&test10004&test10005;
fulltest=test00&test01&test02&test03&test04&test05&test06&test07&test08&test09&test10&test11&test12&test13&test100;

lightmsg=(lighttest?"Test for light-version  passed.":"Test for light-version failed.");
mediummsg=(mediumtest?"Test for medium-version passed.":"Test for medium-version failed.");
longmsg=(longtest?"Test for long-version   passed.":"Test for long-version   failed.");
fullmsg=(fulltest?"Test for full-version   passed.":"Test for full-version   failed.");

out=0;

out=(configuration=="light"?lightmsg:out);
out=(configuration=="medium"?mediummsg:out);
out=(configuration=="long"?longmsg:out);
out=(configuration=="full"?fullmsg:out);
out=((out==0)&fulltest?fullmsg:out);
out=((out==0)&longtest?longmsg:out);
out=((out==0)&mediumtest?mediummsg:out);
out=((out==0)&lighttest?lightmsg:out);

out=(out==0?"Test failed!":out);

out
""
quit