~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to tests/acceptance-tests/test_test_framework.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-01-08 02:04:38 UTC
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: package-import@ubuntu.com-20140108020438-e1npu0pm7qdv5wc4
Tags: upstream-0.1.3+14.04.20140108
Import upstream version 0.1.3+14.04.20140108

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright © 2012 Canonical Ltd.
 
2
 * Copyright © 2012, 2013 Canonical Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License version 3 as
17
17
 */
18
18
 
19
19
#include "mir_test_framework/display_server_test_fixture.h"
 
20
#include "mir_test_framework/testing_server_configuration.h"
 
21
#include "mir_test_framework/in_process_server.h"
20
22
 
21
 
#include "mir/frontend/connector.h"
 
23
#include "mir_toolkit/mir_client_library.h"
22
24
 
23
25
#include <gmock/gmock.h>
24
26
#include <gtest/gtest.h>
64
66
        launch_client_process(demo);
65
67
    }
66
68
}
 
69
 
 
70
namespace
 
71
{
 
72
struct DemoInProcessServer : mir_test_framework::InProcessServer
 
73
{
 
74
    virtual mir::DefaultServerConfiguration& server_config() { return server_config_; }
 
75
 
 
76
    mir_test_framework::StubbedServerConfiguration server_config_;
 
77
};
 
78
}
 
79
 
 
80
TEST_F(DemoInProcessServer, client_can_connect)
 
81
{
 
82
    auto const connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
 
83
    EXPECT_TRUE(mir_connection_is_valid(connection));
 
84
 
 
85
    mir_connection_release(connection);
 
86
}