From 16b73a78bed54d7fe75a3e15e46bafd0c2fc0a34 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 2 May 2018 21:28:35 +0200 Subject: [PATCH] fix test case ZeroInitialized: need InitWindows before GetNextEvent --- AutomatedTests/ZeroInitialized.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AutomatedTests/ZeroInitialized.c b/AutomatedTests/ZeroInitialized.c index 288717bd13..129293f1c5 100644 --- a/AutomatedTests/ZeroInitialized.c +++ b/AutomatedTests/ZeroInitialized.c @@ -1,5 +1,7 @@ #include "Test.h" #include +#include +#include int zeroInitedArray[32768]; int commonSymbol; @@ -28,7 +30,15 @@ int main() } zeroInitedArray[i] = 42; } + + // Initialize some of the Macintosh Toolbox + // and maybe trigger a context switch, so we can be sure + // our global variables were put in the right placce. + InitGraf(&qd.thePort); + InitFonts(); + InitWindows(); GetNextEvent(everyEvent, &e); + for(i = 0; i < 32768; i++) { if(zeroInitedArray[i] != 42)