Files
panopainter/tests/app_core/document_sharing_tests.cpp

29 lines
761 B
C++

#include "app_core/document_sharing.h"
#include "test_harness.h"
namespace {
void share_requires_saved_document_path(pp::tests::Harness& harness)
{
PP_EXPECT(
harness,
pp::app::plan_document_share("") == pp::app::DocumentShareAction::show_save_required_warning);
}
void share_allows_nonempty_document_path(pp::tests::Harness& harness)
{
PP_EXPECT(
harness,
pp::app::plan_document_share("D:/Paint/demo.ppi") == pp::app::DocumentShareAction::share_now);
}
}
int main()
{
pp::tests::Harness harness;
harness.run("share requires saved document path", share_requires_saved_document_path);
harness.run("share allows nonempty document path", share_allows_nonempty_document_path);
return harness.finish();
}