~ci-train-bot/ubuntu-app-launch/ubuntu-app-launch-ubuntu-zesty-2264

« back to all changes in this revision

Viewing changes to tests/libual-cpp-test.cc

  • Committer: Bileto Bot
  • Author(s): Ted Gould
  • Date: 2017-04-04 21:48:00 UTC
  • mfrom: (307.4.10 instance-compare)
  • Revision ID: ci-train-bot@canonical.com-20170404214800-1pdzt8y1btammbx8
Provide equality operators for Application and Application::Instance objects. (LP: #1677345)

Approved by: Pete Woods

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
    EXPECT_EQ("unity8-package_foo_x123", (std::string)apps.back()->appId());
625
625
}
626
626
 
 
627
TEST_F(LibUAL, Equality)
 
628
{
 
629
    auto appid = ubuntu::app_launch::AppID::find(registry, "single");
 
630
 
 
631
    auto black = std::make_shared<MockApp>(appid, registry->impl);
 
632
    auto white = std::make_shared<MockApp>(appid, registry->impl);
 
633
 
 
634
    /* The outside isn't equal */
 
635
    EXPECT_NE(black, white);
 
636
 
 
637
    /* The inside is */
 
638
    EXPECT_EQ(*black, *white);
 
639
 
 
640
    auto multiappid = ubuntu::app_launch::AppID::find(registry, "multiple");
 
641
 
 
642
    auto cat = std::make_shared<MockApp>(appid, registry->impl);
 
643
    auto dog = std::make_shared<MockApp>(multiappid, registry->impl);
 
644
 
 
645
    EXPECT_NE(*cat, *dog);
 
646
}
 
647
 
627
648
TEST_F(LibUAL, StartingResponses)
628
649
{
629
650
    /* Get Bus */