equal
deleted
inserted
replaced
54 function checkFails(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; |
54 function checkFails(Assert: boolean; Msg: shortstring; isFatal: boolean): boolean; |
55 begin |
55 begin |
56 if not Assert then |
56 if not Assert then |
57 begin |
57 begin |
58 lastConsoleLine:= Msg; |
58 lastConsoleLine:= Msg; |
59 OutError(Msg, false); |
59 OutError(Msg, isFatal); |
60 end; |
60 end; |
61 |
61 |
62 allOK:= allOK and (Assert or (not isFatal)); |
62 allOK:= allOK and (Assert or (not isFatal)); |
63 checkFails:= (not Assert) and isFatal |
63 checkFails:= (not Assert) and isFatal |
64 end; |
64 end; |
67 var s: shortstring; |
67 var s: shortstring; |
68 begin |
68 begin |
69 if not Assert then |
69 if not Assert then |
70 begin |
70 begin |
71 s:= SDL_GetError(); |
71 s:= SDL_GetError(); |
72 OutError(Msg + ': ' + s, false) |
72 OutError(Msg + ': ' + s, isFatal) |
73 end; |
73 end; |
74 |
74 |
75 allOK:= allOK and (Assert or (not isFatal)); |
75 allOK:= allOK and (Assert or (not isFatal)); |
76 SDLCheck:= (not Assert) and isFatal |
76 SDLCheck:= (not Assert) and isFatal |
77 end; |
77 end; |