Skip to content

Commit

Permalink
modifications to simplify and improve testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hant-hub committed Dec 31, 2024
1 parent 776aa2d commit dc25031
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 6 additions & 3 deletions library/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ if(F3D_MODULE_UI)
TestSDKDynamicBackgroundColor.cxx
TestSDKDynamicFontFile.cxx
TestSDKDynamicProperties.cxx
TestSDKEngineRecreation.cxx
TestSDKInteractorCallBack.cxx
TestSDKInteractorDocumentation.cxx
TestSDKMultiOptions.cxx
Expand All @@ -50,6 +49,12 @@ if(VTK_VERSION VERSION_GREATER_EQUAL 9.2.20230426)
)
endif()

if (VTK_VERSION VERSION_GREATER_EQUAL 9.2.6)
list(APPEND libf3dSDKTests_list
TestSDKEngineRecreation.cxx
)
endif()

# Invalid scene codepath needs https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11287
# Merge with TestSDKScene.cxx when VTK 9.4.0 is required.
if(VTK_VERSION VERSION_GREATER_EQUAL 9.3.20240707)
Expand All @@ -63,8 +68,6 @@ configure_file("${F3D_SOURCE_DIR}/testing/recordings/TestSDKInteractorCallBack.l
"${CMAKE_BINARY_DIR}/TestSDKInteractorCallBack.log") # Dragon.vtu; S
configure_file("${F3D_SOURCE_DIR}/testing/recordings/TestSDKInteractorDropFullScene.log.in"
"${CMAKE_BINARY_DIR}/TestSDKInteractorDropFullScene.log") # world.obj; S
configure_file("${F3D_SOURCE_DIR}/testing/recordings/TestSDKEngineRecreation.log.in"
"${CMAKE_BINARY_DIR}/TestSDKEngineRecreation.log") # world.obj; S

# External window tests
option(F3D_TESTING_ENABLE_EXTERNAL_GLFW "Test external GLFW" OFF)
Expand Down
6 changes: 1 addition & 5 deletions library/testing/TestSDKEngineRecreation.cxx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#include <engine.h>
#include <interactor.h>
#include <log.h>
#include <options.h>
#include <scene.h>
#include <window.h>

#include <iostream>

int TestSDKEngineRecreation(int argc, char* argv[])
{
std::string filename = "TestSDKEngineRecreation";
std::string interactionFilePath = std::string(argv[2]) + "../../" + filename + ".log";
std::string interactionFilePath = std::string(argv[1]) + "/recordings/" +filename + ".log";
f3d::engine* eng = new f3d::engine(f3d::engine::create(false));
eng->getInteractor().start(1 / 30, [eng]() { eng->getInteractor().stop(); });
delete eng;
Expand Down

0 comments on commit dc25031

Please sign in to comment.