Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 1 | // Copyright (c) Benjamin Kietzman (github.com/bkietz) |
| 2 | // |
| 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | |
| 6 | #include <dbus/connection.hpp> |
| 7 | #include <dbus/endpoint.hpp> |
| 8 | #include <dbus/filter.hpp> |
| 9 | #include <dbus/match.hpp> |
| 10 | #include <dbus/message.hpp> |
| 11 | #include <functional> |
| 12 | |
| 13 | #include <unistd.h> |
| 14 | #include <gtest/gtest.h> |
| 15 | |
| 16 | using namespace boost::asio; |
| 17 | using namespace dbus; |
| 18 | using boost::system::error_code; |
| 19 | |
| 20 | TEST(ErrorTest, GetHostName) { |
| 21 | io_service io; |
| 22 | EXPECT_THROW(connection system_bus(io, "unix:path=/foo/bar/baz_socket"), |
| 23 | boost::system::system_error); |
| 24 | |
| 25 | io.run(); |
| 26 | } |