~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

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
}