Route app shutdown staging through app core
This commit is contained in:
@@ -565,6 +565,16 @@ add_test(NAME pp_app_core_app_frame_tests COMMAND pp_app_core_app_frame_tests)
|
||||
set_tests_properties(pp_app_core_app_frame_tests PROPERTIES
|
||||
LABELS "app;desktop-fast;fuzz")
|
||||
|
||||
add_executable(pp_app_core_app_shutdown_tests
|
||||
app_core/app_shutdown_tests.cpp)
|
||||
target_link_libraries(pp_app_core_app_shutdown_tests PRIVATE
|
||||
pp_app_core
|
||||
pp_test_harness)
|
||||
|
||||
add_test(NAME pp_app_core_app_shutdown_tests COMMAND pp_app_core_app_shutdown_tests)
|
||||
set_tests_properties(pp_app_core_app_shutdown_tests PROPERTIES
|
||||
LABELS "app;desktop-fast")
|
||||
|
||||
add_executable(pp_app_core_document_sharing_tests
|
||||
app_core/document_sharing_tests.cpp)
|
||||
target_link_libraries(pp_app_core_document_sharing_tests PRIVATE
|
||||
@@ -969,6 +979,19 @@ if(TARGET pano_cli)
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-frame\".*\"updateFrame\":false.*\"drawCanvasStroke\":false.*\"drawVrUi\":false.*\"drawMainUi\":false.*\"resetRedraw\":true")
|
||||
|
||||
add_test(NAME pano_cli_plan_app_shutdown_smoke
|
||||
COMMAND pano_cli plan-app-shutdown)
|
||||
set_tests_properties(pano_cli_plan_app_shutdown_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-shutdown\".*\"saveUiState\":true.*\"terminateStrokePreviewRenderer\":true.*\"stopRecording\":true.*\"invalidateTextures\":true.*\"invalidateShaders\":true.*\"unloadLayouts\":true.*\"destroyUiRenderTarget\":true.*\"destroyFacePlane\":true.*\"releasePanelNodes\":true.*\"clearQuickModeState\":true")
|
||||
|
||||
add_test(NAME pano_cli_plan_app_shutdown_rejects_unknown_option
|
||||
COMMAND pano_cli plan-app-shutdown --unexpected)
|
||||
set_tests_properties(pano_cli_plan_app_shutdown_rejects_unknown_option PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
WILL_FAIL TRUE
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-shutdown\".*\"message\":\"unknown option\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_brush_package_import_ppbr_smoke
|
||||
COMMAND pano_cli plan-brush-package-import
|
||||
--kind ppbr
|
||||
|
||||
29
tests/app_core/app_shutdown_tests.cpp
Normal file
29
tests/app_core/app_shutdown_tests.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "app_core/app_shutdown.h"
|
||||
#include "test_harness.h"
|
||||
|
||||
namespace {
|
||||
|
||||
void shutdown_plan_preserves_legacy_cleanup_sequence(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto plan = pp::app::plan_app_shutdown();
|
||||
|
||||
PP_EXPECT(harness, plan.save_ui_state);
|
||||
PP_EXPECT(harness, plan.terminate_stroke_preview_renderer);
|
||||
PP_EXPECT(harness, plan.stop_recording);
|
||||
PP_EXPECT(harness, plan.invalidate_textures);
|
||||
PP_EXPECT(harness, plan.invalidate_shaders);
|
||||
PP_EXPECT(harness, plan.unload_layouts);
|
||||
PP_EXPECT(harness, plan.destroy_ui_render_target);
|
||||
PP_EXPECT(harness, plan.destroy_face_plane);
|
||||
PP_EXPECT(harness, plan.release_panel_nodes);
|
||||
PP_EXPECT(harness, plan.clear_quick_mode_state);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main()
|
||||
{
|
||||
pp::tests::Harness harness;
|
||||
harness.run("shutdown plan preserves legacy cleanup sequence", shutdown_plan_preserves_legacy_cleanup_sequence);
|
||||
return harness.finish();
|
||||
}
|
||||
Reference in New Issue
Block a user