Plan display file actions in app core
This commit is contained in:
@@ -17,6 +17,20 @@ void picked_path_invokes_callback_for_nonempty_path(pp::tests::Harness& harness)
|
||||
pp::app::plan_picked_path("D:/Paint/demo.ppi") == pp::app::PickedPathAction::invoke_callback);
|
||||
}
|
||||
|
||||
void display_file_ignores_empty_path(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_display_file("") == pp::app::DisplayFileAction::ignore_empty_path);
|
||||
}
|
||||
|
||||
void display_file_opens_nonempty_path(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_display_file("D:/Paint/export.png") == pp::app::DisplayFileAction::open_external_file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -24,5 +38,7 @@ 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);
|
||||
harness.run("display file ignores empty path", display_file_ignores_empty_path);
|
||||
harness.run("display file opens nonempty path", display_file_opens_nonempty_path);
|
||||
return harness.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user