Пример #1
0
int main()
{
  NSInitialize();

  TestFrame tf;

  tf.map();

  NSMainLoop();

  return 0;
}
Пример #2
0
 void
 verifyBasicProperties()
   {
     CHECK (1024 < sizeof(TestFrame));
     
     TestFrame frameA;
     TestFrame frameB;
     TestFrame frameC(5);
     
     CHECK (frameA == frameB);
     CHECK (frameA != frameC);
     CHECK (frameB != frameC);
     
     CHECK (frameA.isAlive());
     CHECK (frameB.isAlive());
     CHECK (frameC.isAlive());
     
     CHECK (frameA.isSane());
     CHECK (frameB.isSane());
     CHECK (frameC.isSane());
     
     void * frameMem = &frameB;
     
     CHECK (frameA == frameMem);
     corruptMemory(frameMem,20,5);
     CHECK (!frameB.isSane());
     
     frameB = frameC;
     
     CHECK (frameB.isSane());
     CHECK (frameA != frameB);
     CHECK (frameA != frameC);
     CHECK (frameB == frameC);
   }
Пример #3
0
 void
 verifyFrameLifecycle()
   {
     CHECK (!TestFrame::isDead  (this));
     CHECK (!TestFrame::isAlive (this));
     
     TestFrame* onHeap = new TestFrame(23);
     CHECK ( TestFrame::isAlive (onHeap));
     CHECK (!onHeap->isDead());
     CHECK (onHeap->isAlive());
     CHECK (onHeap->isSane());
     
     delete onHeap;
     CHECK ( TestFrame::isDead  (onHeap));
     CHECK (!TestFrame::isAlive (onHeap));
   }
Пример #4
0
 void
 verifyFrameLifecycle()
   {
     CHECK (!TestFrame::isDead  (this));
     CHECK (!TestFrame::isAlive (this));
     
     static char buffer[sizeof(TestFrame)];
     TestFrame* frame = new(&buffer) TestFrame(23);
     
     CHECK ( TestFrame::isAlive (frame));
     CHECK (!frame->isDead());
     CHECK (frame->isAlive());
     CHECK (frame->isSane());
     
     frame->~TestFrame();
     CHECK ( TestFrame::isDead  (frame));
     CHECK (!TestFrame::isAlive (frame));
   }
Пример #5
0
 friend bool operator!= (TestFrame const& f1, TestFrame const& f2) { return !f1.contentEquals(f2); }
Пример #6
0
bool App::OnInit() {
	TestFrame *frame = new TestFrameHandler();
	frame->Show();
	SetTopWindow(frame);
	return true;
}