Refactor yaze_test
This commit is contained in:
@@ -109,8 +109,8 @@ class EditorManager : public SharedRom, public core::ExperimentFlags {
|
||||
emu::Emulator emulator_;
|
||||
|
||||
Project current_project_;
|
||||
yaze_editor_context editor_context_;
|
||||
ExtensionManager extension_manager_;
|
||||
yaze_editor_context editor_context_;
|
||||
|
||||
Editor* current_editor_ = nullptr;
|
||||
AssemblyEditor assembly_editor_;
|
||||
|
||||
@@ -3,7 +3,6 @@ include(../cmake/gtest.cmake)
|
||||
add_executable(
|
||||
yaze_test
|
||||
test/yaze_test.cc
|
||||
# test/libc_test.cc
|
||||
test/rom_test.cc
|
||||
test/core/message_test.cc
|
||||
test/gfx/compression_test.cc
|
||||
@@ -46,7 +45,7 @@ target_link_libraries(
|
||||
${PNG_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
# yaze_c
|
||||
yaze_c
|
||||
ImGuiTestEngine
|
||||
ImGui
|
||||
gmock_main
|
||||
@@ -56,6 +55,7 @@ target_link_libraries(
|
||||
)
|
||||
target_compile_definitions(yaze_test PRIVATE "linux")
|
||||
target_compile_definitions(yaze_test PRIVATE "stricmp=strcasecmp")
|
||||
target_compile_definitions(yaze_test PRIVATE "IMGUI_ENABLE_TEST_ENGINE")
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(yaze_test)
|
||||
@@ -1,15 +0,0 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "yaze.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace test {
|
||||
|
||||
TEST(YazeCLibTest, InitializeAndCleanup) {
|
||||
yaze_flags flags;
|
||||
yaze_init(&flags);
|
||||
yaze_cleanup(&flags);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
@@ -1,5 +1,7 @@
|
||||
#define SDL_MAIN_HANDLED
|
||||
|
||||
#include "yaze.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -16,6 +18,18 @@
|
||||
#include "imgui_test_engine/imgui_te_imconfig.h"
|
||||
#include "test/integration/test_editor.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace test {
|
||||
|
||||
TEST(YazeCLibTest, InitializeAndCleanup) {
|
||||
yaze_flags flags;
|
||||
yaze_init(&flags);
|
||||
yaze_cleanup(&flags);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
absl::InitializeSymbolizer(argv[0]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user