Пример #1
0
int UtcDaliStageSceneCreatedSignalP(void)
{
  TestApplication app;
  Stage stage = Stage::GetCurrent();

  bool signalCalled = false;
  SceneCreatedStatusFunctor sceneCreatedFunctor( signalCalled );
  stage.SceneCreatedSignal().Connect( &app, sceneCreatedFunctor );

  Integration::Core& core = app.GetCore();
  core.SceneCreated();
  DALI_TEST_EQUALS( signalCalled, true, TEST_LOCATION );

  END_TEST;
}
Пример #2
0
int UtcDaliStageSceneCreatedSignalN(void)
{
  TestApplication app;
  Stage stage;

  // Check that connecting to the signal with a bad stage instance causes an assert.
  bool asserted = false;
  bool signalCalled = false;
  SceneCreatedStatusFunctor sceneCreatedFunctor( signalCalled );
  try
  {
    stage.SceneCreatedSignal().Connect( &app, sceneCreatedFunctor );
  }
  catch( Dali::DaliException& e )
  {
    DALI_TEST_PRINT_ASSERT( e );
    DALI_TEST_ASSERT( e, "stage && \"Stage handle is empty\"", TEST_LOCATION );
    asserted = true;
  }
  DALI_TEST_CHECK( asserted );

  END_TEST;
}