Plan picked path callbacks in app core
This commit is contained in:
28
tests/app_core/document_platform_io_tests.cpp
Normal file
28
tests/app_core/document_platform_io_tests.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "app_core/document_platform_io.h"
|
||||
#include "test_harness.h"
|
||||
|
||||
namespace {
|
||||
|
||||
void picked_path_ignores_empty_path(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_picked_path("") == pp::app::PickedPathAction::ignore_empty_path);
|
||||
}
|
||||
|
||||
void picked_path_invokes_callback_for_nonempty_path(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_picked_path("D:/Paint/demo.ppi") == pp::app::PickedPathAction::invoke_callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
pp::tests::Harness harness;
|
||||
harness.run("picked path ignores empty path", picked_path_ignores_empty_path);
|
||||
harness.run("picked path invokes callback for nonempty path", picked_path_invokes_callback_for_nonempty_path);
|
||||
return harness.finish();
|
||||
}
|
||||
Reference in New Issue
Block a user