yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::test::EditorIntegrationTest Class Reference

Base class for editor integration tests. More...

#include <editor_integration_test.h>

Collaboration diagram for yaze::test::EditorIntegrationTest:

Public Member Functions

 EditorIntegrationTest ()
 
 ~EditorIntegrationTest ()
 
absl::Status Initialize ()
 
int RunTest ()
 
virtual void RegisterTests (void *engine)
 
virtual absl::Status Update ()
 

Protected Member Functions

absl::Status LoadTestRom (const std::string &filename)
 
absl::Status SaveTestRom (const std::string &filename)
 
absl::Status TestEditorInitialize (editor::Editor *editor)
 
absl::Status TestEditorLoad (editor::Editor *editor)
 
absl::Status TestEditorSave (editor::Editor *editor)
 
absl::Status TestEditorUpdate (editor::Editor *editor)
 
absl::Status TestEditorCut (editor::Editor *editor)
 
absl::Status TestEditorCopy (editor::Editor *editor)
 
absl::Status TestEditorPaste (editor::Editor *editor)
 
absl::Status TestEditorUndo (editor::Editor *editor)
 
absl::Status TestEditorRedo (editor::Editor *editor)
 
absl::Status TestEditorFind (editor::Editor *editor)
 
absl::Status TestEditorClear (editor::Editor *editor)
 

Private Attributes

core::Controller controller_
 
std::unique_ptr< Romtest_rom_
 
core::Window window_
 
std::unique_ptr< gfx::SDL2Renderertest_renderer_
 

Detailed Description

Base class for editor integration tests.

This class provides common functionality for testing editors in the application. It sets up the test environment and provides helper methods for ROM operations.

For UI interaction testing, use the ImGui test engine API directly within your test functions:

ImGuiTest* test = IM_REGISTER_TEST(engine, "test_suite", "test_name"); test->TestFunc = [](ImGuiTestContext* ctx) { ctx->SetRef("Window Name"); ctx->ItemClick("Button Name"); };

Definition at line 36 of file editor_integration_test.h.

Constructor & Destructor Documentation

◆ EditorIntegrationTest()

yaze::test::EditorIntegrationTest::EditorIntegrationTest ( )

Definition at line 23 of file editor_integration_test.cc.

◆ ~EditorIntegrationTest()

yaze::test::EditorIntegrationTest::~EditorIntegrationTest ( )

Definition at line 31 of file editor_integration_test.cc.

Member Function Documentation

◆ Initialize()

◆ RunTest()

int yaze::test::EditorIntegrationTest::RunTest ( )

◆ RegisterTests()

virtual void yaze::test::EditorIntegrationTest::RegisterTests ( void *  engine)
inlinevirtual

Definition at line 52 of file editor_integration_test.h.

Referenced by Initialize().

◆ Update()

absl::Status yaze::test::EditorIntegrationTest::Update ( )
virtual

Definition at line 99 of file editor_integration_test.cc.

Referenced by RunTest().

◆ LoadTestRom()

absl::Status yaze::test::EditorIntegrationTest::LoadTestRom ( const std::string &  filename)
protected

Definition at line 112 of file editor_integration_test.cc.

References test_rom_.

◆ SaveTestRom()

absl::Status yaze::test::EditorIntegrationTest::SaveTestRom ( const std::string &  filename)
protected

◆ TestEditorInitialize()

absl::Status yaze::test::EditorIntegrationTest::TestEditorInitialize ( editor::Editor editor)
protected

Definition at line 128 of file editor_integration_test.cc.

References yaze::editor::Editor::Initialize().

Here is the call graph for this function:

◆ TestEditorLoad()

absl::Status yaze::test::EditorIntegrationTest::TestEditorLoad ( editor::Editor editor)
protected

Definition at line 136 of file editor_integration_test.cc.

References yaze::editor::Editor::Load().

Here is the call graph for this function:

◆ TestEditorSave()

absl::Status yaze::test::EditorIntegrationTest::TestEditorSave ( editor::Editor editor)
protected

Definition at line 143 of file editor_integration_test.cc.

References yaze::editor::Editor::Save().

Here is the call graph for this function:

◆ TestEditorUpdate()

absl::Status yaze::test::EditorIntegrationTest::TestEditorUpdate ( editor::Editor editor)
protected

Definition at line 150 of file editor_integration_test.cc.

References yaze::editor::Editor::Update().

Here is the call graph for this function:

◆ TestEditorCut()

absl::Status yaze::test::EditorIntegrationTest::TestEditorCut ( editor::Editor editor)
protected

Definition at line 157 of file editor_integration_test.cc.

References yaze::editor::Editor::Cut().

Here is the call graph for this function:

◆ TestEditorCopy()

absl::Status yaze::test::EditorIntegrationTest::TestEditorCopy ( editor::Editor editor)
protected

Definition at line 164 of file editor_integration_test.cc.

References yaze::editor::Editor::Copy().

Here is the call graph for this function:

◆ TestEditorPaste()

absl::Status yaze::test::EditorIntegrationTest::TestEditorPaste ( editor::Editor editor)
protected

Definition at line 171 of file editor_integration_test.cc.

References yaze::editor::Editor::Paste().

Here is the call graph for this function:

◆ TestEditorUndo()

absl::Status yaze::test::EditorIntegrationTest::TestEditorUndo ( editor::Editor editor)
protected

Definition at line 178 of file editor_integration_test.cc.

References yaze::editor::Editor::Undo().

Here is the call graph for this function:

◆ TestEditorRedo()

absl::Status yaze::test::EditorIntegrationTest::TestEditorRedo ( editor::Editor editor)
protected

Definition at line 185 of file editor_integration_test.cc.

References yaze::editor::Editor::Redo().

Here is the call graph for this function:

◆ TestEditorFind()

absl::Status yaze::test::EditorIntegrationTest::TestEditorFind ( editor::Editor editor)
protected

Definition at line 192 of file editor_integration_test.cc.

References yaze::editor::Editor::Find().

Here is the call graph for this function:

◆ TestEditorClear()

absl::Status yaze::test::EditorIntegrationTest::TestEditorClear ( editor::Editor editor)
protected

Definition at line 199 of file editor_integration_test.cc.

References yaze::editor::Editor::Clear().

Here is the call graph for this function:

Member Data Documentation

◆ controller_

core::Controller yaze::test::EditorIntegrationTest::controller_
private

Definition at line 78 of file editor_integration_test.h.

Referenced by Initialize(), and RunTest().

◆ test_rom_

std::unique_ptr<Rom> yaze::test::EditorIntegrationTest::test_rom_
private

Definition at line 83 of file editor_integration_test.h.

Referenced by LoadTestRom(), and SaveTestRom().

◆ window_

core::Window yaze::test::EditorIntegrationTest::window_
private

Definition at line 84 of file editor_integration_test.h.

Referenced by Initialize().

◆ test_renderer_

std::unique_ptr<gfx::SDL2Renderer> yaze::test::EditorIntegrationTest::test_renderer_
private

Definition at line 85 of file editor_integration_test.h.

Referenced by Initialize().


The documentation for this class was generated from the following files: