MCPcopy Create free account
hub / github.com/axmolengine/axmol / onEnter

Method onEnter

tests/cpp-tests/Source/BaseTest.cpp:464–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464void TestCase::onEnter()
465{
466 Scene::onEnter();
467
468 if (_testSuite == nullptr)
469 {
470 setTestSuite(TestController::getInstance()->getCurrTestSuite());
471 }
472
473 if (_testSuite)
474 {
475 _titleLabel->setString(fmt::format("{}:{}", static_cast<int>(_testSuite->getCurrTestIndex() + 1),
476 title()));
477 }
478 else
479 {
480 _titleLabel->setString(title());
481 }
482 _subtitleLabel->setString(subtitle());
483
484 if (_testSuite && _testSuite->getChildTestCount() < 2)
485 {
486 _priorTestItem->setVisible(false);
487 _nextTestItem->setVisible(false);
488 _restartTestItem->setVisible(false);
489 }
490
491#if AX_ENABLE_EXT_IMGUI
492 extension::Inspector::getInstance()->openForScene(this);
493#endif
494}
495
496void TestCase::onExit()
497{

Callers

nothing calls this directly

Calls 9

setTestSuiteFunction · 0.85
getInstanceFunction · 0.85
getCurrTestSuiteMethod · 0.80
getCurrTestIndexMethod · 0.80
getChildTestCountMethod · 0.80
openForSceneMethod · 0.80
formatFunction · 0.50
setStringMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected