-- version control marker $Id: cgtest73.occ,v 1.1 1997/03/31 09:06:59 djb1 Exp $
-- User Defined Operators tests by Jim Moores <jm40@ukc.ac.uk>


PROC cgtest73 (CHAN OF BYTE keyb, scr, err)

  #INCLUDE "cgmain.occ"
  #INCLUDE "cgreal.occ"

  PROC test0 ()
    [2]INT FUNCTION "+" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a + b
      check.INT (c[1],2,"test0")
  :

  PROC test1 ()
    [2]INT32 FUNCTION "+" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a + b
      check.INT32 (c[1],2,"test1")
  :

  PROC test2 ()
    [2]INT64 FUNCTION "+" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a + b
      check.INT64 (c[1],2,"test2")
  :

  PROC test3 ()
    [2]REAL32 FUNCTION "+" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a + b
      check.REAL32 (c[1],2.0,"test3")
  :

  PROC test4 ()
    [2]REAL64 FUNCTION "+" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a + b
      check.REAL64 (c[1],2.0,"test4")
  :

  PROC test5 ()
    [2]BOOL FUNCTION "+" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a + b
      check.BOOL (c[1],FALSE,"test5")
  :

  PROC test6 ()
    [2]INT FUNCTION "-" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a - b
      check.INT (c[1],2,"test6")
  :

  PROC test7 ()
    [2]INT32 FUNCTION "-" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a - b
      check.INT32 (c[1],2,"test7")
  :

  PROC test8 ()
    [2]INT64 FUNCTION "-" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a - b
      check.INT64 (c[1],2,"test8")
  :

  PROC test9 ()
    [2]REAL32 FUNCTION "-" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a - b
      check.REAL32 (c[1],2.0,"test9")
  :

  PROC test10 ()
    [2]REAL64 FUNCTION "-" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a - b
      check.REAL64 (c[1],2.0,"test10")
  :

  PROC test11 ()
    [2]BOOL FUNCTION "-" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a - b
      check.BOOL (c[1],FALSE,"test11")
  :

  PROC test12 ()
    [2]INT FUNCTION "/" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a / b
      check.INT (c[1],2,"test12")
  :

  PROC test13 ()
    [2]INT32 FUNCTION "/" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a / b
      check.INT32 (c[1],2,"test13")
  :

  PROC test14 ()
    [2]INT64 FUNCTION "/" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a / b
      check.INT64 (c[1],2,"test14")
  :

  PROC test15 ()
    [2]REAL32 FUNCTION "/" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a / b
      check.REAL32 (c[1],2.0,"test15")
  :

  PROC test16 ()
    [2]REAL64 FUNCTION "/" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a / b
      check.REAL64 (c[1],2.0,"test16")
  :

  PROC test17 ()
    [2]BOOL FUNCTION "/" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a / b
      check.BOOL (c[1],FALSE,"test17")
  :

  PROC test18 ()
    [2]INT FUNCTION "\" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a \ b
      check.INT (c[1],2,"test18")
  :

  PROC test19 ()
    [2]INT32 FUNCTION "\" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a \ b
      check.INT32 (c[1],2,"test19")
  :

  PROC test20 ()
    [2]INT64 FUNCTION "\" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a \ b
      check.INT64 (c[1],2,"test20")
  :

  PROC test21 ()
    [2]REAL32 FUNCTION "\" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a \ b
      check.REAL32 (c[1],2.0,"test21")
  :

  PROC test22 ()
    [2]REAL64 FUNCTION "\" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a \ b
      check.REAL64 (c[1],2.0,"test22")
  :

  PROC test23 ()
    [2]BOOL FUNCTION "\" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a \ b
      check.BOOL (c[1],FALSE,"test23")
  :

  PROC test24 ()
    [2]INT FUNCTION "**" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a * b
      check.INT (c[1],2,"test24")
  :

  PROC test25 ()
    [2]INT32 FUNCTION "**" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a * b
      check.INT32 (c[1],2,"test25")
  :

  PROC test26 ()
    [2]INT64 FUNCTION "**" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a * b
      check.INT64 (c[1],2,"test26")
  :

  PROC test27 ()
    [2]REAL32 FUNCTION "**" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a * b
      check.REAL32 (c[1],2.0,"test27")
  :

  PROC test28 ()
    [2]REAL64 FUNCTION "**" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a * b
      check.REAL64 (c[1],2.0,"test28")
  :

  PROC test29 ()
    [2]BOOL FUNCTION "**" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a * b
      check.BOOL (c[1],FALSE,"test29")
  :

  PROC test30 ()
    [2]INT FUNCTION "<" (VAL [2]INT a, VAL [2]INT b) IS [2,2]:
    [2]INT a:
    [2]INT b:
    [2]INT c:
    SEQ
      c := a < b
      check.INT (c[1],2,"test30")
  :

  PROC test31 ()
    [2]INT32 FUNCTION "<" (VAL [2]INT32 a, VAL [2]INT32 b) IS [2,2]:
    [2]INT32 a:
    [2]INT32 b:
    [2]INT32 c:
    SEQ
      c := a < b
      check.INT32 (c[1],2,"test31")
  :

  PROC test32 ()
    [2]INT64 FUNCTION "<" (VAL [2]INT64 a, VAL [2]INT64 b) IS [2,2]:
    [2]INT64 a:
    [2]INT64 b:
    [2]INT64 c:
    SEQ
      c := a < b
      check.INT64 (c[1],2,"test32")
  :

  PROC test33 ()
    [2]REAL32 FUNCTION "<" (VAL [2]REAL32 a, VAL [2]REAL32 b) IS [2.0,2.0]:
    [2]REAL32 a:
    [2]REAL32 b:
    [2]REAL32 c:
    SEQ
      c := a < b
      check.REAL32 (c[1],2.0,"test33")
  :

  PROC test34 ()
    [2]REAL64 FUNCTION "<" (VAL [2]REAL64 a, VAL [2]REAL64 b) IS [2.0,2.0]:
    [2]REAL64 a:
    [2]REAL64 b:
    [2]REAL64 c:
    SEQ
      c := a < b
      check.REAL64 (c[1],2.0,"test34")
  :

  PROC test35 ()
    [2]BOOL FUNCTION "<" (VAL [2]BOOL a, VAL [2]BOOL b) IS [TRUE,FALSE]:
    [2]BOOL a:
    [2]BOOL b:
    [2]BOOL c:
    SEQ
      c := a < b
      check.BOOL (c[1],FALSE,"test35")
  :
  SEQ
    init ("CG test 73","User Defined Operators 4")
    title("Testing fixed size arrays")
    test0()
    test1()
    test2()
    test3()
    test4()
    test5()
    test6()
    test7()
    test8()
    test9()
    test10()
    test11()
    test12()
    test13()
    test14()
    test15()
    test16()
    test17()
    test18()
    test19()
    test20()
    test21()
    test22()
    test23()
    test24()
    test25()
    test26()
    test27()
    test28()
    test29()
    test30()
    test31()
    test32()
    test33()
    test34()
    test35()
    finish ()
:
