feat(tests): conditionally include ImGui test engine functionality

- Added conditional compilation for ImGui test engine features in `test_utils.cc` and `test_utils.h`, enabling the loading of ROMs and opening of editors only when the YAZE_ENABLE_IMGUI_TEST_ENGINE flag is set.
- Improved modularity by managing includes based on feature flags, enhancing the flexibility of the testing framework.

Benefits:
- Streamlined testing process for ImGui-related functionalities.
- Enhanced code organization by isolating ImGui test engine dependencies.
This commit is contained in:
scawful
2025-10-11 15:19:12 -04:00
parent 8a2b3e3767
commit 4358603874
2 changed files with 10 additions and 1 deletions

View File

@@ -15,9 +15,12 @@
#include <gmock/gmock.h>
#include "absl/strings/str_format.h"
#include "imgui_test_engine/imgui_te_context.h"
#include "app/rom.h"
#ifdef YAZE_ENABLE_IMGUI_TEST_ENGINE
#include "imgui_test_engine/imgui_te_context.h"
#endif
namespace yaze {
namespace test {
@@ -193,8 +196,10 @@ class RomDependentTest : public ::testing::Test {
namespace gui {
#ifdef YAZE_ENABLE_IMGUI_TEST_ENGINE
void LoadRomInTest(ImGuiTestContext* ctx, const std::string& rom_path);
void OpenEditorInTest(ImGuiTestContext* ctx, const std::string& editor_name);
#endif
} // namespace gui