| 462 | } |
| 463 | |
| 464 | void 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 | |
| 496 | void TestCase::onExit() |
| 497 | { |
nothing calls this directly
no test coverage detected