aboutsummaryrefslogtreecommitdiff
path: root/pkg/vocl/errtest/zztest.cl
blob: d63151f1ca97f45ded4dab341b86d5647a04c589 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#{  ZZTEST -- Test various iferr constructs.

procedure zztest ()

begin
	int	nerrs

	onerror ("flpr")

	printf ("Testing iferr....\n")
	nerrs = 0

	for (i=1; i <= 5; i=i+1) {
	    iferr { fpe () } then {
	        print ("    error from test #"//i)
		nerrs = nerrs + 1
	    } else {
	        print ("    NO error from test #"//i)
	    }
	}

	if (nerrs > 0) 
	    error (999, "errors found in script")
end