Technique: Test environment

Walter Pachl from Vienna sent me the proof of errors in one my subprogram. Its code is ingeniously simple test environment.

signal on HALT
signal on NOVALUE
signal on SYNTAX
...
code of debugging program
...
NOVALUE:
  say 'Novalue raised in line' Sigl
  say SOURCELINE(Sigl)
  say 'Variable' CONDITION('D')
  signal LOOKAROUND
 
SYNTAX:
  say 'Syntax raised in line' Sigl
  say SOURCELINE(Sigl)
  say 'rc='rc '('ERRORTEXT(rc)')'
 
HALT:
LOOKAROUND:
  do
    say 'You can look around now.'
    trace ?R
    nop
  end
exit 12

 

CO-AUTHOR
Walter Pachl is the author of the test environment.

Cover Contents Index Main page

last modified 11th September 2001
Copyright 2000-2001 Vladimir Zabrodsky
Czech Republic