aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test001.pas37
1 files changed, 22 insertions, 15 deletions
diff --git a/test/test001.pas b/test/test001.pas
index 5339f275..c9ba266f 100644
--- a/test/test001.pas
+++ b/test/test001.pas
@@ -1,7 +1,7 @@
program test001;
{
-This program test the function glext_ExtensionSupported from unit glext.
+This program tests the function glext_ExtensionSupported from unit glext.
}
uses
@@ -36,6 +36,13 @@ var
surface: PSDL_Surface;
videoFlags: integer;
testFailed: boolean;
+
+procedure treatTestFailure(testNumber: integer, var testFailed: boolean);
+begin
+ writeln;
+ write ('test001, ', testNumber, ': failed');
+ testFailed := true;
+end;
begin
write ('test001: Start ... ');
@@ -54,20 +61,20 @@ begin
// Initialization finished
- if glext_ExtensionSupported(e1, s1) then begin writeln; write ('test001, 1: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e1, s2) then begin writeln; write ('test001, 2: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e2, s1) then begin writeln; write ('test001, 3: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s2) then begin writeln; write ('test001, 4: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s3) then begin writeln; write ('test001, 5: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s4) then begin writeln; write ('test001, 6: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s5) then begin writeln; write ('test001, 7: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s6) then begin writeln; write ('test001, 8: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e2, s7) then begin writeln; write ('test001, 9: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e2, s8) then begin writeln; write ('test001, 10: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e2, s9) then begin writeln; write ('test001, 11: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e2, s10) then begin writeln; write ('test001, 12: failed'); testFailed := true; end;
- if glext_ExtensionSupported(e2, s11) then begin writeln; write ('test001, 13: failed'); testFailed := true; end;
- if not glext_ExtensionSupported(e3, s1) then begin writeln; write ('test001, 14: failed'); testFailed := true; end;
+ if glext_ExtensionSupported(e1, s1) then treatTestFailure( 1, testFailed);
+ if glext_ExtensionSupported(e1, s2) then treatTestFailure( 2, testFailed);
+ if glext_ExtensionSupported(e2, s1) then treatTestFailure( 3, testFailed);
+ if not glext_ExtensionSupported(e2, s2) then treatTestFailure( 4, testFailed);
+ if not glext_ExtensionSupported(e2, s3) then treatTestFailure( 5, testFailed);
+ if not glext_ExtensionSupported(e2, s4) then treatTestFailure( 6, testFailed);
+ if not glext_ExtensionSupported(e2, s5) then treatTestFailure( 7, testFailed);
+ if not glext_ExtensionSupported(e2, s6) then treatTestFailure( 8, testFailed);
+ if not glext_ExtensionSupported(e2, s7) then treatTestFailure( 9, testFailed);
+ if glext_ExtensionSupported(e2, s8) then treatTestFailure(10, testFailed);
+ if glext_ExtensionSupported(e2, s9) then treatTestFailure(11, testFailed);
+ if glext_ExtensionSupported(e2, s10) then treatTestFailure(12, testFailed);
+ if glext_ExtensionSupported(e2, s11) then treatTestFailure(13, testFailed);
+ if not glext_ExtensionSupported(e3, s1) then treatTestFailure(14, testFailed);
if testFailed then
begin