2017-10-03 23:56:05 +00:00
|
|
|
#include "Test.h"
|
|
|
|
#include <Events.h>
|
2018-05-02 19:28:35 +00:00
|
|
|
#include <Quickdraw.h>
|
|
|
|
#include <Windows.h>
|
2017-10-03 23:56:05 +00:00
|
|
|
|
|
|
|
int zeroInitedArray[32768];
|
|
|
|
int commonSymbol;
|
|
|
|
int zeroInited = 0;
|
|
|
|
EventRecord e;
|
|
|
|
|
2022-12-05 10:23:46 +00:00
|
|
|
int main(void)
|
2017-10-03 23:56:05 +00:00
|
|
|
{
|
2019-08-18 11:21:00 +00:00
|
|
|
int i;
|
|
|
|
if(commonSymbol)
|
|
|
|
{
|
|
|
|
TEST_LOG_NO();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if(zeroInited)
|
|
|
|
{
|
|
|
|
TEST_LOG_NO();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
for(i = 0; i < 32768; i++)
|
|
|
|
{
|
|
|
|
if(zeroInitedArray[i])
|
|
|
|
{
|
|
|
|
TEST_LOG_NO();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
zeroInitedArray[i] = 42;
|
|
|
|
}
|
|
|
|
|
2018-05-02 19:28:35 +00:00
|
|
|
// 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.
|
2019-01-02 14:12:57 +00:00
|
|
|
#if !TARGET_API_MAC_CARBON
|
2019-08-18 11:21:00 +00:00
|
|
|
InitGraf(&qd.thePort);
|
|
|
|
InitFonts();
|
|
|
|
InitWindows();
|
2019-01-02 14:12:57 +00:00
|
|
|
#endif
|
2019-08-18 11:21:00 +00:00
|
|
|
GetNextEvent(everyEvent, &e);
|
2018-05-02 19:28:35 +00:00
|
|
|
|
2019-08-18 11:21:00 +00:00
|
|
|
for(i = 0; i < 32768; i++)
|
|
|
|
{
|
|
|
|
if(zeroInitedArray[i] != 42)
|
|
|
|
{
|
|
|
|
TEST_LOG_NO();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TEST_LOG_OK();
|
|
|
|
return 0;
|
2017-10-03 23:56:05 +00:00
|
|
|
}
|