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