Files
panopainter/tests/CMakeLists.txt

649 lines
37 KiB
CMake

add_library(pp_test_harness INTERFACE)
target_include_directories(pp_test_harness INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(pp_test_harness INTERFACE
pp_project_options
pp_project_warnings)
add_executable(pp_foundation_binary_stream_tests
foundation/binary_stream_tests.cpp
)
target_link_libraries(pp_foundation_binary_stream_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_binary_stream_tests COMMAND pp_foundation_binary_stream_tests)
set_tests_properties(pp_foundation_binary_stream_tests PROPERTIES
LABELS "foundation;desktop-fast;fuzz")
add_executable(pp_foundation_event_tests
foundation/event_tests.cpp)
target_link_libraries(pp_foundation_event_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_event_tests COMMAND pp_foundation_event_tests)
set_tests_properties(pp_foundation_event_tests PROPERTIES
LABELS "foundation;desktop-fast")
add_executable(pp_foundation_log_tests
foundation/log_tests.cpp)
target_link_libraries(pp_foundation_log_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_log_tests COMMAND pp_foundation_log_tests)
set_tests_properties(pp_foundation_log_tests PROPERTIES
LABELS "foundation;desktop-fast")
add_executable(pp_foundation_parse_tests
foundation/parse_tests.cpp)
target_link_libraries(pp_foundation_parse_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_parse_tests COMMAND pp_foundation_parse_tests)
set_tests_properties(pp_foundation_parse_tests PROPERTIES
LABELS "foundation;desktop-fast")
add_executable(pp_foundation_task_queue_tests
foundation/task_queue_tests.cpp)
target_link_libraries(pp_foundation_task_queue_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_task_queue_tests COMMAND pp_foundation_task_queue_tests)
set_tests_properties(pp_foundation_task_queue_tests PROPERTIES
LABELS "foundation;desktop-fast")
add_executable(pp_foundation_trace_tests
foundation/trace_tests.cpp)
target_link_libraries(pp_foundation_trace_tests PRIVATE
pp_foundation
pp_test_harness)
add_test(NAME pp_foundation_trace_tests COMMAND pp_foundation_trace_tests)
set_tests_properties(pp_foundation_trace_tests PROPERTIES
LABELS "foundation;desktop-fast")
add_executable(pp_assets_image_format_tests
assets/image_format_tests.cpp)
target_link_libraries(pp_assets_image_format_tests PRIVATE
pp_assets
pp_test_harness)
add_test(NAME pp_assets_image_format_tests COMMAND pp_assets_image_format_tests)
set_tests_properties(pp_assets_image_format_tests PROPERTIES
LABELS "assets;desktop-fast")
add_executable(pp_assets_image_metadata_tests
assets/image_metadata_tests.cpp)
target_link_libraries(pp_assets_image_metadata_tests PRIVATE
pp_assets
pp_test_harness)
add_test(NAME pp_assets_image_metadata_tests COMMAND pp_assets_image_metadata_tests)
set_tests_properties(pp_assets_image_metadata_tests PROPERTIES
LABELS "assets;desktop-fast;fuzz")
add_executable(pp_assets_image_pixels_tests
assets/image_pixels_tests.cpp)
target_link_libraries(pp_assets_image_pixels_tests PRIVATE
pp_assets
pp_test_harness)
add_test(NAME pp_assets_image_pixels_tests COMMAND pp_assets_image_pixels_tests)
set_tests_properties(pp_assets_image_pixels_tests PROPERTIES
LABELS "assets;desktop-fast")
add_executable(pp_assets_ppi_header_tests
assets/ppi_header_tests.cpp)
target_link_libraries(pp_assets_ppi_header_tests PRIVATE
pp_assets
pp_test_harness)
add_test(NAME pp_assets_ppi_header_tests COMMAND pp_assets_ppi_header_tests)
set_tests_properties(pp_assets_ppi_header_tests PROPERTIES
LABELS "assets;desktop-fast;fuzz")
add_executable(pp_assets_settings_document_tests
assets/settings_document_tests.cpp)
target_link_libraries(pp_assets_settings_document_tests PRIVATE
pp_assets
pp_test_harness)
add_test(NAME pp_assets_settings_document_tests COMMAND pp_assets_settings_document_tests)
set_tests_properties(pp_assets_settings_document_tests PROPERTIES
LABELS "assets;desktop-fast")
add_executable(pp_paint_brush_tests
paint/brush_tests.cpp)
target_link_libraries(pp_paint_brush_tests PRIVATE
pp_paint
pp_test_harness)
add_test(NAME pp_paint_brush_tests COMMAND pp_paint_brush_tests)
set_tests_properties(pp_paint_brush_tests PROPERTIES
LABELS "paint;desktop-fast")
add_executable(pp_paint_blend_tests
paint/blend_tests.cpp)
target_link_libraries(pp_paint_blend_tests PRIVATE
pp_paint
pp_test_harness)
add_test(NAME pp_paint_blend_tests COMMAND pp_paint_blend_tests)
set_tests_properties(pp_paint_blend_tests PROPERTIES
LABELS "paint;desktop-fast")
add_executable(pp_paint_stroke_tests
paint/stroke_tests.cpp)
target_link_libraries(pp_paint_stroke_tests PRIVATE
pp_paint
pp_test_harness)
add_test(NAME pp_paint_stroke_tests COMMAND pp_paint_stroke_tests)
set_tests_properties(pp_paint_stroke_tests PROPERTIES
LABELS "paint;desktop-fast;stress")
add_executable(pp_paint_stroke_script_tests
paint/stroke_script_tests.cpp)
target_link_libraries(pp_paint_stroke_script_tests PRIVATE
pp_paint
pp_test_harness)
add_test(NAME pp_paint_stroke_script_tests COMMAND pp_paint_stroke_script_tests)
set_tests_properties(pp_paint_stroke_script_tests PROPERTIES
LABELS "paint;desktop-fast;fuzz")
add_executable(pp_document_tests
document/document_tests.cpp)
target_link_libraries(pp_document_tests PRIVATE
pp_document
pp_test_harness)
add_test(NAME pp_document_tests COMMAND pp_document_tests)
set_tests_properties(pp_document_tests PROPERTIES
LABELS "document;desktop-fast")
add_executable(pp_document_ppi_import_tests
document/ppi_import_tests.cpp)
target_link_libraries(pp_document_ppi_import_tests PRIVATE
pp_document
pp_test_harness)
add_test(NAME pp_document_ppi_import_tests COMMAND pp_document_ppi_import_tests)
set_tests_properties(pp_document_ppi_import_tests PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_executable(pp_document_ppi_export_tests
document/ppi_export_tests.cpp)
target_link_libraries(pp_document_ppi_export_tests PRIVATE
pp_document
pp_test_harness)
add_test(NAME pp_document_ppi_export_tests COMMAND pp_document_ppi_export_tests)
set_tests_properties(pp_document_ppi_export_tests PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_executable(pp_renderer_api_tests
renderer_api/renderer_api_tests.cpp)
target_link_libraries(pp_renderer_api_tests PRIVATE
pp_renderer_api
pp_test_harness)
add_test(NAME pp_renderer_api_tests COMMAND pp_renderer_api_tests)
set_tests_properties(pp_renderer_api_tests PROPERTIES
LABELS "renderer;desktop-fast")
if(TARGET pp_renderer_gl)
add_executable(pp_renderer_gl_capabilities_tests
renderer_gl/capabilities_tests.cpp)
target_link_libraries(pp_renderer_gl_capabilities_tests PRIVATE
pp_renderer_gl
pp_test_harness)
add_test(NAME pp_renderer_gl_capabilities_tests COMMAND pp_renderer_gl_capabilities_tests)
set_tests_properties(pp_renderer_gl_capabilities_tests PROPERTIES
LABELS "renderer;desktop-fast")
add_executable(pp_renderer_gl_command_plan_tests
renderer_gl/command_plan_tests.cpp)
target_link_libraries(pp_renderer_gl_command_plan_tests PRIVATE
pp_renderer_gl
pp_test_harness)
add_test(NAME pp_renderer_gl_command_plan_tests COMMAND pp_renderer_gl_command_plan_tests)
set_tests_properties(pp_renderer_gl_command_plan_tests PROPERTIES
LABELS "renderer;desktop-fast")
endif()
add_executable(pp_paint_renderer_compositor_tests
paint_renderer/compositor_tests.cpp)
target_link_libraries(pp_paint_renderer_compositor_tests PRIVATE
pp_paint_renderer
pp_test_harness)
add_test(NAME pp_paint_renderer_compositor_tests COMMAND pp_paint_renderer_compositor_tests)
set_tests_properties(pp_paint_renderer_compositor_tests PROPERTIES
LABELS "renderer;paint;desktop-fast")
add_executable(pp_ui_core_color_tests
ui_core/color_tests.cpp)
target_link_libraries(pp_ui_core_color_tests PRIVATE
pp_ui_core
pp_test_harness)
add_test(NAME pp_ui_core_color_tests COMMAND pp_ui_core_color_tests)
set_tests_properties(pp_ui_core_color_tests PROPERTIES
LABELS "ui;desktop-fast")
add_executable(pp_ui_core_layout_value_tests
ui_core/layout_value_tests.cpp)
target_link_libraries(pp_ui_core_layout_value_tests PRIVATE
pp_ui_core
pp_test_harness)
add_test(NAME pp_ui_core_layout_value_tests COMMAND pp_ui_core_layout_value_tests)
set_tests_properties(pp_ui_core_layout_value_tests PROPERTIES
LABELS "ui;desktop-fast")
add_executable(pp_ui_core_layout_xml_tests
ui_core/layout_xml_tests.cpp)
target_link_libraries(pp_ui_core_layout_xml_tests PRIVATE
pp_ui_core
pp_test_harness)
add_test(NAME pp_ui_core_layout_xml_tests COMMAND pp_ui_core_layout_xml_tests)
set_tests_properties(pp_ui_core_layout_xml_tests PROPERTIES
LABELS "ui;desktop-fast;fuzz")
add_executable(pp_app_core_document_route_tests
app_core/document_route_tests.cpp)
target_link_libraries(pp_app_core_document_route_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_document_route_tests COMMAND pp_app_core_document_route_tests)
set_tests_properties(pp_app_core_document_route_tests PROPERTIES
LABELS "app;desktop-fast;fuzz")
add_executable(pp_app_core_document_export_tests
app_core/document_export_tests.cpp)
target_link_libraries(pp_app_core_document_export_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_document_export_tests COMMAND pp_app_core_document_export_tests)
set_tests_properties(pp_app_core_document_export_tests PROPERTIES
LABELS "app;desktop-fast;fuzz")
add_executable(pp_app_core_document_session_tests
app_core/document_session_tests.cpp)
target_link_libraries(pp_app_core_document_session_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_document_session_tests COMMAND pp_app_core_document_session_tests)
set_tests_properties(pp_app_core_document_session_tests PROPERTIES
LABELS "app;desktop-fast")
if(TARGET pano_cli)
add_test(NAME pano_cli_create_document_smoke
COMMAND pano_cli create-document --width 64 --height 32 --layers 2)
set_tests_properties(pano_cli_create_document_smoke PROPERTIES
LABELS "integration;desktop-fast")
add_test(NAME pano_cli_create_animation_document_smoke
COMMAND pano_cli create-document --width 64 --height 32 --layers 2 --frames 3 --frame-duration-ms 250)
set_tests_properties(pano_cli_create_animation_document_smoke PROPERTIES
LABELS "document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"frames\":3.*\"activeFrame\":2.*\"animationDurationMs\":750")
add_test(NAME pano_cli_inspect_image_rejects_unsupported
COMMAND pano_cli inspect-image --path "${CMAKE_CURRENT_SOURCE_DIR}/data/images/unsupported-image.txt")
set_tests_properties(pano_cli_inspect_image_rejects_unsupported PROPERTIES
LABELS "assets;integration;desktop-fast"
WILL_FAIL TRUE)
add_test(NAME pano_cli_inspect_png_metadata_smoke
COMMAND pano_cli inspect-image --path "${CMAKE_CURRENT_SOURCE_DIR}/data/images/tiny-rgba-header.png")
set_tests_properties(pano_cli_inspect_png_metadata_smoke PROPERTIES
LABELS "assets;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"format\":\"png\".*\"width\":320.*\"height\":240.*\"components\":4.*\"colorType\":\"rgba\"")
add_test(NAME pano_cli_import_image_rejects_truncated_png
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DIMAGE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/data/images/tiny-rgba-header.png
"-DEXPECTED_OUTPUT=PNG payload could not be decoded"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_import_image_failure.cmake")
set_tests_properties(pano_cli_import_image_rejects_truncated_png PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_test(NAME pano_cli_import_image_smoke
COMMAND pano_cli import-image
--path "${CMAKE_CURRENT_SOURCE_DIR}/data/images/tiny-rgba-1x1.png"
--document-width 64
--document-height 32
--face 5
--x 7
--y 11)
set_tests_properties(pano_cli_import_image_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"import-image\".*\"image\":\\{\"format\":\"png\",\"width\":1,\"height\":1,\"bytes\":4\\}.*\"document\":\\{\"width\":64,\"height\":32,\"layers\":1,\"frames\":1,\"facePayloads\":1\\}.*\"payload\":\\{\"face\":5,\"x\":7,\"y\":11,\"width\":1,\"height\":1,\"bytes\":4\\}")
add_test(NAME pano_cli_export_image_roundtrip_smoke
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/export-roundtrip.png
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pano_cli_export_image_roundtrip.cmake")
set_tests_properties(pano_cli_export_image_roundtrip_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_test(NAME pano_cli_inspect_project_layout_smoke
COMMAND pano_cli inspect-project --path "${CMAKE_CURRENT_SOURCE_DIR}/data/projects/minimal-project.ppi")
set_tests_properties(pano_cli_inspect_project_layout_smoke PROPERTIES
LABELS "assets;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"thumbnail\":\\{\"width\":128,\"height\":128,\"components\":4,\"bytes\":65536\\}.*\"body\":\\{\"offset\":65576,\"bytes\":73,\"width\":64,\"height\":32,\"layers\":1,\"frames\":1,\"dirtyFaces\":0,\"rgbaFacePayloads\":0,\"compressedBytes\":0,\"infoBytes\":0\\}.*\"layers\":\\[\\{\"index\":0,\"storedOrder\":0,\"name\":\"Ink\"")
add_test(NAME pano_cli_load_project_metadata_smoke
COMMAND pano_cli load-project --path "${CMAKE_CURRENT_SOURCE_DIR}/data/projects/minimal-project.ppi")
set_tests_properties(pano_cli_load_project_metadata_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"load-project\".*\"pixelDataLoaded\":false.*\"facePayloads\":0.*\"document\":\\{\"width\":64,\"height\":32,\"layers\":1,\"frames\":1,\"animationDurationMs\":100,\"layerNames\":\\[\"Ink\"\\],\"layerFrameCounts\":\\[1\\],\"layerDurationsMs\":\\[100\\]")
add_test(NAME pano_cli_classify_open_project_smoke
COMMAND pano_cli classify-open --path "D:/Paint/Scenes/demo.ppi")
set_tests_properties(pano_cli_classify_open_project_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"classify-open\".*\"kind\":\"open-project\".*\"directory\":\"D:/Paint/Scenes\".*\"name\":\"demo\".*\"extension\":\"ppi\"")
add_test(NAME pano_cli_classify_open_brush_import_smoke
COMMAND pano_cli classify-open --path "D:/Paint/Brushes/clouds.ABR")
set_tests_properties(pano_cli_classify_open_brush_import_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"classify-open\".*\"kind\":\"import-abr\".*\"name\":\"clouds\".*\"extension\":\"abr\"")
add_test(NAME pano_cli_classify_open_ppbr_import_smoke
COMMAND pano_cli classify-open --path "D:/Paint/Brushes/palette.PpBr")
set_tests_properties(pano_cli_classify_open_ppbr_import_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"classify-open\".*\"kind\":\"import-ppbr\".*\"name\":\"palette\".*\"extension\":\"ppbr\"")
add_test(NAME pano_cli_classify_open_rejects_missing_directory
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOPEN_PATH=demo.ppi
"-DEXPECTED_OUTPUT=document path must include a directory and file name"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_classify_open_failure.cmake")
set_tests_properties(pano_cli_classify_open_rejects_missing_directory PROPERTIES
LABELS "app;integration;desktop-fast;fuzz"
)
add_test(NAME pano_cli_plan_open_route_project_clean_smoke
COMMAND pano_cli plan-open-route --path "D:/Paint/Scenes/demo.ppi")
set_tests_properties(pano_cli_plan_open_route_project_clean_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-open-route\".*\"kind\":\"open-project\".*\"unsaved\":false.*\"action\":\"open-project-now\"")
add_test(NAME pano_cli_plan_open_route_project_unsaved_smoke
COMMAND pano_cli plan-open-route --path "D:/Paint/Scenes/demo.ppi" --unsaved)
set_tests_properties(pano_cli_plan_open_route_project_unsaved_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-open-route\".*\"kind\":\"open-project\".*\"unsaved\":true.*\"action\":\"prompt-discard-unsaved-project\"")
add_test(NAME pano_cli_plan_open_route_abr_import_smoke
COMMAND pano_cli plan-open-route --path "D:/Paint/Brushes/clouds.ABR" --unsaved)
set_tests_properties(pano_cli_plan_open_route_abr_import_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-open-route\".*\"kind\":\"import-abr\".*\"unsaved\":true.*\"action\":\"prompt-import-abr\"")
add_test(NAME pano_cli_plan_document_file_save_now_smoke
COMMAND pano_cli plan-document-file --work-dir D:/Paint --name demo)
set_tests_properties(pano_cli_plan_document_file_save_now_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-document-file\".*\"name\":\"demo\".*\"directory\":\"D:/Paint\".*\"path\":\"D:/Paint/demo.ppi\".*\"exists\":false.*\"decision\":\"save-now\"")
add_test(NAME pano_cli_plan_document_file_overwrite_smoke
COMMAND pano_cli plan-document-file --work-dir D:/Paint --name demo --target-exists)
set_tests_properties(pano_cli_plan_document_file_overwrite_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-document-file\".*\"path\":\"D:/Paint/demo.ppi\".*\"exists\":true.*\"decision\":\"prompt-overwrite\"")
add_test(NAME pano_cli_plan_new_document_smoke
COMMAND pano_cli plan-new-document --work-dir D:/Paint --name demo --resolution-index 3)
set_tests_properties(pano_cli_plan_new_document_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-new-document\".*\"path\":\"D:/Paint/demo.ppi\".*\"exists\":false.*\"resolution\":2048.*\"decision\":\"save-now\"")
add_test(NAME pano_cli_plan_new_document_overwrite_smoke
COMMAND pano_cli plan-new-document --work-dir D:/Paint --name demo --resolution-index 1 --target-exists)
set_tests_properties(pano_cli_plan_new_document_overwrite_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-new-document\".*\"path\":\"D:/Paint/demo.ppi\".*\"exists\":true.*\"resolution\":1024.*\"decision\":\"prompt-overwrite\"")
add_test(NAME pano_cli_plan_new_document_rejects_invalid_resolution
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
"-DEXPECTED_OUTPUT=document resolution index is out of range"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_plan_new_document_failure.cmake")
set_tests_properties(pano_cli_plan_new_document_rejects_invalid_resolution PROPERTIES
LABELS "app;integration;desktop-fast;fuzz")
add_test(NAME pano_cli_plan_document_version_first_smoke
COMMAND pano_cli plan-document-version --directory D:/Paint --doc-name demo)
set_tests_properties(pano_cli_plan_document_version_first_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-document-version\".*\"documentName\":\"demo\".*\"name\":\"demo.01\".*\"path\":\"D:/Paint/demo.01.ppi\"")
add_test(NAME pano_cli_plan_document_version_skip_existing_smoke
COMMAND pano_cli plan-document-version --directory D:/Paint --doc-name demo.01 --existing-path D:/Paint/demo.02.ppi)
set_tests_properties(pano_cli_plan_document_version_skip_existing_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-document-version\".*\"documentName\":\"demo.01\".*\"existingPaths\":1.*\"name\":\"demo.03\".*\"path\":\"D:/Paint/demo.03.ppi\"")
add_test(NAME pano_cli_plan_export_start_allowed_smoke
COMMAND pano_cli plan-export-start --requires-license)
set_tests_properties(pano_cli_plan_export_start_allowed_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-start\".*\"requiresLicense\":true.*\"licenseValid\":true.*\"hasCanvas\":true.*\"decision\":\"start-now\"")
add_test(NAME pano_cli_plan_export_start_demo_blocked_smoke
COMMAND pano_cli plan-export-start --requires-license --demo)
set_tests_properties(pano_cli_plan_export_start_demo_blocked_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-start\".*\"requiresLicense\":true.*\"licenseValid\":false.*\"decision\":\"show-license-disabled\"")
add_test(NAME pano_cli_plan_export_start_no_canvas_smoke
COMMAND pano_cli plan-export-start --no-canvas)
set_tests_properties(pano_cli_plan_export_start_no_canvas_smoke PROPERTIES
LABELS "app;integration;desktop-fast;fuzz"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-start\".*\"requiresLicense\":false.*\"hasCanvas\":false.*\"decision\":\"unavailable-no-canvas\"")
add_test(NAME pano_cli_plan_export_target_file_smoke
COMMAND pano_cli plan-export-target --kind file --work-dir D:/Paint --doc-name demo --extension .png)
set_tests_properties(pano_cli_plan_export_target_file_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"file\".*\"path\":\"D:/Paint/demo.png\".*\"suggestedName\":\"demo.png\"")
add_test(NAME pano_cli_plan_export_target_collection_smoke
COMMAND pano_cli plan-export-target --kind collection --work-dir D:/Paint --doc-name demo --suffix _layers)
set_tests_properties(pano_cli_plan_export_target_collection_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"collection\".*\"directory\":\"D:/Paint/demo_layers\".*\"stemPath\":\"D:/Paint/demo_layers/demo\"")
add_test(NAME pano_cli_plan_export_target_name_smoke
COMMAND pano_cli plan-export-target --kind name --doc-name demo --suffix -timelapse)
set_tests_properties(pano_cli_plan_export_target_name_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-target\".*\"kind\":\"name\".*\"suggestedName\":\"demo-timelapse\"")
add_test(NAME pano_cli_simulate_app_session_clean_smoke
COMMAND pano_cli simulate-app-session)
set_tests_properties(pano_cli_simulate_app_session_clean_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"hasCanvas\":true.*\"newDocument\":false.*\"unsaved\":false.*\"closePromptOpen\":false.*\"projectOpen\":\"open-now\".*\"closeRequest\":\"close-now\".*\"saveIntent\":\"save\".*\"saveRequest\":\"no-op\".*\"workflowStart\":\"continue-now\"")
add_test(NAME pano_cli_simulate_app_session_unsaved_smoke
COMMAND pano_cli simulate-app-session --unsaved)
set_tests_properties(pano_cli_simulate_app_session_unsaved_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"hasCanvas\":true.*\"newDocument\":false.*\"unsaved\":true.*\"closePromptOpen\":false.*\"projectOpen\":\"prompt-discard-unsaved\".*\"closeRequest\":\"show-unsaved-prompt\".*\"saveRequest\":\"save-existing\".*\"workflowStart\":\"prompt-save-before-continue\"")
add_test(NAME pano_cli_simulate_app_session_existing_prompt_smoke
COMMAND pano_cli simulate-app-session --unsaved --close-prompt-open)
set_tests_properties(pano_cli_simulate_app_session_existing_prompt_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"newDocument\":false.*\"unsaved\":true.*\"closePromptOpen\":true.*\"projectOpen\":\"prompt-discard-unsaved\".*\"closeRequest\":\"wait-for-existing-prompt\"")
add_test(NAME pano_cli_simulate_app_session_new_document_save_smoke
COMMAND pano_cli simulate-app-session --new-document)
set_tests_properties(pano_cli_simulate_app_session_new_document_save_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"newDocument\":true.*\"saveIntent\":\"save\".*\"saveRequest\":\"show-save-dialog\"")
add_test(NAME pano_cli_simulate_app_session_save_as_smoke
COMMAND pano_cli simulate-app-session --save-intent save-as)
set_tests_properties(pano_cli_simulate_app_session_save_as_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"saveIntent\":\"save-as\".*\"saveRequest\":\"show-save-dialog\"")
add_test(NAME pano_cli_simulate_app_session_save_version_smoke
COMMAND pano_cli simulate-app-session --save-intent save-version)
set_tests_properties(pano_cli_simulate_app_session_save_version_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"saveIntent\":\"save-version\".*\"saveRequest\":\"save-version\"")
add_test(NAME pano_cli_simulate_app_session_save_dirty_version_clean_smoke
COMMAND pano_cli simulate-app-session --save-intent save-dirty-version)
set_tests_properties(pano_cli_simulate_app_session_save_dirty_version_clean_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"saveIntent\":\"save-dirty-version\".*\"saveRequest\":\"no-op\"")
add_test(NAME pano_cli_simulate_app_session_no_canvas_smoke
COMMAND pano_cli simulate-app-session --no-canvas)
set_tests_properties(pano_cli_simulate_app_session_no_canvas_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-app-session\".*\"hasCanvas\":false.*\"workflowStart\":\"unavailable\"")
add_test(NAME pano_cli_save_project_roundtrip_smoke
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/roundtrip.ppi
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pano_cli_save_project_roundtrip.cmake")
set_tests_properties(pano_cli_save_project_roundtrip_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_test(NAME pano_cli_save_project_payload_roundtrip_smoke
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/payload-roundtrip.ppi
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pano_cli_save_project_payload_roundtrip.cmake")
set_tests_properties(pano_cli_save_project_payload_roundtrip_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_test(NAME pano_cli_save_project_rejects_non_finite_opacity
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/rejected-non-finite-opacity.ppi
"-DEXPECTED_OUTPUT=floating-point value must be finite"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_save_project_failure.cmake")
set_tests_properties(pano_cli_save_project_rejects_non_finite_opacity PROPERTIES
LABELS "assets;document;integration;desktop-fast;fuzz")
add_test(NAME pano_cli_save_document_project_roundtrip_smoke
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/document-export-roundtrip.ppi
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pano_cli_save_document_project_roundtrip.cmake")
set_tests_properties(pano_cli_save_document_project_roundtrip_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast")
add_test(NAME pano_cli_apply_stroke_script_roundtrip_smoke
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DSTROKE_SCRIPT=${CMAKE_CURRENT_SOURCE_DIR}/data/strokes/two-strokes.ppstroke
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/applied-stroke-script.ppi
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pano_cli_apply_stroke_script_roundtrip.cmake")
set_tests_properties(pano_cli_apply_stroke_script_roundtrip_smoke PROPERTIES
LABELS "assets;document;paint;integration;desktop-fast")
add_test(NAME pano_cli_apply_stroke_script_rejects_tiny_canvas
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
-DSTROKE_SCRIPT=${CMAKE_CURRENT_SOURCE_DIR}/data/strokes/two-strokes.ppstroke
-DOUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}/data/generated/rejected-applied-stroke-script.ppi
"-DEXPECTED_OUTPUT=width and height must be between 8 and 4096"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_apply_stroke_script_failure.cmake")
set_tests_properties(pano_cli_apply_stroke_script_rejects_tiny_canvas PROPERTIES
LABELS "document;paint;integration;desktop-fast")
add_test(NAME pano_cli_parse_layout_smoke
COMMAND pano_cli parse-layout --path "${CMAKE_CURRENT_SOURCE_DIR}/data/layouts/simple-layout.xml")
set_tests_properties(pano_cli_parse_layout_smoke PROPERTIES
LABELS "ui;integration;desktop-fast")
add_test(NAME pano_cli_record_render_smoke
COMMAND pano_cli record-render --width 32 --height 16)
set_tests_properties(pano_cli_record_render_smoke PROPERTIES
LABELS "renderer;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"backend\":\"recording\".*\"framebufferFetch\":false.*\"explicitTextureTransitions\":true.*\"textureCopy\":true.*\"renderTargetBlit\":true.*\"frameCapture\":true.*\"float16RenderTargets\":false.*\"float32RenderTargets\":false.*\"width\":32.*\"height\":16.*\"createdResources\":7.*\"exercisedClearReset\":false.*\"clearRejectedOrphanedTraceEnd\":false.*\"clearReusedRenderPass\":false.*\"labeledCommandDescriptors\":16.*\"commands\":25.*\"openGlPlan\":.*\"available\":true.*\"supported\":true.*\"commands\":25.*\"renderPasses\":1.*\"drawCommands\":1.*\"shaderBindCommands\":1.*\"uniformCommands\":1.*\"textureBindCommands\":1.*\"samplerBindCommands\":1.*\"uploadCommands\":1.*\"mipmapCommands\":1.*\"transitionCommands\":4.*\"copyCommands\":1.*\"readbackCommands\":1.*\"captureCommands\":1.*\"passthroughCommands\":0.*\"traceCommands\":3.*\"unsupportedCommands\":0.*\"renderPassOrderErrors\":0.*\"dependencyErrors\":0.*\"endedInRenderPass\":false.*\"renderPasses\":1.*\"depthClears\":1.*\"stencilClears\":0.*\"drawCommands\":1.*\"drawVertices\":3.*\"drawIndices\":3.*\"scissorCommands\":1.*\"blendCommands\":1.*\"depthCommands\":1.*\"uniformCommands\":1.*\"uniformBytes\":64.*\"bindTextureCommands\":1.*\"bindSamplerCommands\":1.*\"boundTextureBytes\":2048.*\"uploadCommands\":1.*\"uploadBytes\":4.*\"mipmapCommands\":1.*\"mipmapLevels\":3.*\"mipmapBytes\":84.*\"transitionCommands\":4.*\"transitionToUpload\":1.*\"transitionToShaderRead\":2.*\"copyCommands\":1.*\"copySourceBytes\":2048.*\"copyDestinationBytes\":2048.*\"readbackCommands\":1.*\"readbackBytes\":2048.*\"captureCommands\":1.*\"captureBytes\":2048.*\"blitCommands\":1.*\"blitSourceBytes\":2048.*\"blitDestinationBytes\":2048.*\"traceMarkers\":1.*\"traceBeginScopes\":1.*\"traceEndScopes\":1")
add_test(NAME pano_cli_record_render_exercises_clear_reset
COMMAND pano_cli record-render --width 32 --height 16 --exercise-clear)
set_tests_properties(pano_cli_record_render_exercises_clear_reset PROPERTIES
LABELS "renderer;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"record-render\".*\"exercisedClearReset\":true.*\"clearRejectedOrphanedTraceEnd\":true.*\"clearReusedRenderPass\":true.*\"commands\":25.*\"renderPasses\":1.*\"traceBeginScopes\":1.*\"traceEndScopes\":1")
add_test(NAME pano_cli_record_render_rejects_oversized_target
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
"-DEXPECTED_OUTPUT=texture byte size exceeds the configured limit"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_record_render_failure.cmake")
set_tests_properties(pano_cli_record_render_rejects_oversized_target PROPERTIES
LABELS "renderer;integration;desktop-fast")
add_test(NAME pano_cli_simulate_document_edits_smoke
COMMAND pano_cli simulate-document-edits --width 128 --height 64)
set_tests_properties(pano_cli_simulate_document_edits_smoke PROPERTIES
LABELS "document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-document-edits\".*\"document\":\\{\"width\":128,\"height\":64,\"layers\":2,\"frames\":3,\"activeLayer\":0,\"activeFrame\":0,\"animationDurationMs\":683,\"facePayloads\":1,\"selectionMasks\":1\\}.*\"activeLayer\":\\{\"name\":\"Ink\",\"visible\":false,\"alphaLocked\":true,\"opacity\":0.625,\"blendMode\":\"overlay\",\"frames\":3\\}.*\"frames\":\\[250,100,333\\].*\"activeLayerFrameDurations\":\\[250,100,333\\].*\"selectionMask\":\\{\"face\":4,\"x\":3,\"y\":5,\"width\":2,\"height\":2,\"bytes\":4,\"maxAlpha\":255\\}")
add_test(NAME pano_cli_simulate_document_history_smoke
COMMAND pano_cli simulate-document-history --width 64 --height 32 --history 4)
set_tests_properties(pano_cli_simulate_document_history_smoke PROPERTIES
LABELS "document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-document-history\".*\"history\":\\{\"size\":3,\"currentIndex\":2,\"canUndo\":true,\"canRedo\":false\\}.*\"undo\":\\{\"layers\":2,\"frames\":1,\"currentIndex\":1,\"canRedo\":true\\}.*\"current\":\\{\"width\":64,\"height\":32,\"layers\":2,\"frames\":2,\"activeLayer\":1,\"activeFrame\":1,\"animationDurationMs\":350\\}")
add_test(NAME pano_cli_simulate_document_export_smoke
COMMAND pano_cli simulate-document-export --width 64 --height 32)
set_tests_properties(pano_cli_simulate_document_export_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-document-export\".*\"source\":\\{\"width\":64,\"height\":32,\"layers\":2,\"frames\":2,\"facePayloads\":2\\}.*\"export\":\\{\"bytes\":[0-9]+,\"dirtyFaces\":2,\"rgbaFacePayloads\":2,\"compressedBytes\":[0-9]+\\}.*\"roundtrip\":\\{\"layers\":2,\"frames\":2,\"facePayloads\":2,\"layerNames\":\\[\"Base\",\"Paint\"\\],\"layerFrameCounts\":\\[2,1\\],\"layerDurationsMs\":\\[350,333\\]\\}.*\"payloads\":\\[\\{\"layer\":0,\"frame\":0,\"face\":0,\"x\":2,\"y\":3,\"bytes\":4,\"alpha\":255\\},\\{\"layer\":1,\"frame\":0,\"face\":5,\"x\":4,\"y\":5,\"bytes\":4,\"alpha\":128\\}\\]")
add_test(NAME pano_cli_simulate_image_import_smoke
COMMAND pano_cli simulate-image-import --width 64 --height 32)
set_tests_properties(pano_cli_simulate_image_import_smoke PROPERTIES
LABELS "assets;document;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-image-import\".*\"image\":\\{\"format\":\"png\",\"width\":1,\"height\":1,\"bytes\":4,\"alpha\":0\\}.*\"document\":\\{\"width\":64,\"height\":32,\"layers\":1,\"frames\":1,\"facePayloads\":1\\}.*\"payload\":\\{\"face\":0,\"x\":0,\"y\":0,\"width\":1,\"height\":1,\"bytes\":4\\}")
add_test(NAME pano_cli_simulate_blend_smoke
COMMAND pano_cli simulate-blend)
set_tests_properties(pano_cli_simulate_blend_smoke PROPERTIES
LABELS "paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"simulate-blend\".*\"finalBlendModes\":5.*\"strokeBlendModes\":11.*\"normal\":\\{\"r\":0.44,\"g\":0.32,\"b\":0.4,\"a\":0.625\\}.*\"multiply\":\\{\"r\":0.125,\"g\":0.25,\"b\":0.375,\"a\":1\\}.*\"stroke\":\\{\"normal\":0.35,\"linearHeight\":0.637171,\"height\":0.228217,\"unknown\":1\\}")
add_test(NAME pano_cli_simulate_stroke_smoke
COMMAND pano_cli simulate-stroke --x1 0 --y1 0 --x2 10 --y2 0 --spacing 2)
set_tests_properties(pano_cli_simulate_stroke_smoke PROPERTIES
LABELS "paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"samples\":6.*\"distance\":10")
add_test(NAME pano_cli_simulate_stroke_script_smoke
COMMAND pano_cli simulate-stroke-script --path "${CMAKE_CURRENT_SOURCE_DIR}/data/strokes/two-strokes.ppstroke")
set_tests_properties(pano_cli_simulate_stroke_script_smoke PROPERTIES
LABELS "paint;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"strokes\":2.*\"samples\":9.*\"distance\":20")
endif()