write('Testing pairs ...\n\n');
t := time();

a := 1:2;
b := 1:2;

for i from -1k to 1k do  # change d := 1k:1k below if you change this loop
   a[1] := i; a[2] := i;
   b[1] := i; b[2] := i
od;

c := 0;
for i to 1k do
   inc c;
   if a <> b then
      print(tostring(c) & '>1|', '<>')
   fi;
   if not(a = b) then
      print(tostring(c) & '>2|', '=')
   fi;
   if not(a == b) then
      print(tostring(c) & '>3|', '==')
   fi;
   d := copy(a);
   if a <> d then
      print(tostring(c) & '>4|', 'copy <>')
   fi;
   if not(a = d) then
      print(tostring(c) & '>5|', 'not/=')
   fi;
   if not(a == d) then
      print(tostring(c) & '>6|', 'not/==')
   fi;
   clear d;
   if not(1.5 in 1:2) then
      print(tostring(c), 'in, 1')
   fi;
   if 3.5 in 1:2 then
      print(tostring(c), 'in, 2')
   fi;
   a5 := 1:2;
   a5[1] := a5;
   if environ.isselfref(a5) <> true then
      print(tostring(c), 'environ.isselfref')
   fi;
   b2 := 3:6;
   if map(<< (x) ->  x^2 >>, b2) <> 9:36 then
      print(tostring(c), 'map')
   fi;
   if reduce(<< item, accumulator -> item + accumulator >>, 1:2, 0) <> 3 then
      print(tostring(c), 'reduce')
   fi;
od;

writeline('\nDone in ' & time()-t & ' seconds');

# delete all global variables
clear a, a5, b, c, i, t;

