~ted/ubuntu-app-launch/second-exec-test

« back to all changes in this revision

Viewing changes to tests/second-exec-test.cc

  • Committer: Ted Gould
  • Date: 2013-09-27 17:01:48 UTC
  • Revision ID: ted@gould.cx-20130927170148-qsj18noij8i3dtqe
Make a test, make sure it works.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
{
31
31
        private:
32
32
                GTestDBus * testbus = NULL;
 
33
 
 
34
        protected:
33
35
                gchar * last_focus_appid = NULL;
34
36
                gchar * last_resume_appid = NULL;
35
37
 
 
38
        private:
36
39
                static void focus_cb (const gchar * appid, gpointer user_data) {
37
40
                        SecondExecTest * _this = static_cast<SecondExecTest *>(user_data);
38
41
                        g_free(_this->last_focus_appid);
66
69
                }
67
70
};
68
71
 
69
 
TEST_F(SecondExecTest, StubTest)
 
72
TEST_F(SecondExecTest, AppIdTest)
70
73
{
71
 
        ASSERT_TRUE(TRUE);
 
74
        second_exec("foo", NULL);
 
75
        ASSERT_STREQ(this->last_focus_appid, "foo");
 
76
        ASSERT_STREQ(this->last_resume_appid, "foo");
72
77
}