Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
check linking
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 16, 2014
1 parent 7e1f549 commit 456de4e
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions rpm/qtaround.spec
Expand Up @@ -38,6 +38,7 @@ Summary: QtAround D-Bus development files
Group: Development/Libraries
Requires: qtaround = %{version}-%{release}
Requires: qtaround-dbus = %{version}-%{release}
Requires: qtaround-devel = %{version}-%{release}
%description dbus-devel
%{summary}

Expand Down
8 changes: 8 additions & 0 deletions tests/CMakeLists.txt
Expand Up @@ -35,3 +35,11 @@ configure_file(tests.xml.in tests.xml @ONLY)
FILE(GLOB SH_FILES *.sh)
install(PROGRAMS ${SH_FILES} DESTINATION ${TESTS_DIR})
install(FILES tests.xml DESTINATION ${TESTS_DIR})

# linking tests
add_executable(test-linking qtaround-link-main.cpp qtaround-link-2.cpp)
target_link_libraries(test-linking qtaround)
qt5_use_modules(test-linking Core)
add_executable(test-linking-dbus qtaround-dbus-link-main.cpp qtaround-dbus-link-2.cpp)
target_link_libraries(test-linking-dbus qtaround qtaround-dbus)
qt5_use_modules(test-linking-dbus Core DBus)
7 changes: 7 additions & 0 deletions tests/qtaround-dbus-link-2.cpp
@@ -0,0 +1,7 @@
#include "test_link_common.hpp"
#include <qtaround/dbus.hpp>

void utest_dummy()
{
std::cout << "Test\n";
}
10 changes: 10 additions & 0 deletions tests/qtaround-dbus-link-main.cpp
@@ -0,0 +1,10 @@
#include "test_link_common.hpp"
#include <qtaround/dbus.hpp>

int main()
{
QDBusConnection c{""};
qtaround::dbus::ServiceWatch w(c, "");
utest_dummy();
return 0;
}
6 changes: 6 additions & 0 deletions tests/qtaround-link-2.cpp
@@ -0,0 +1,6 @@
#include "test_link_common.hpp"

void utest_dummy()
{
std::cout << "Test\n";
}
7 changes: 7 additions & 0 deletions tests/qtaround-link-main.cpp
@@ -0,0 +1,7 @@
#include "test_link_common.hpp"

int main()
{
utest_dummy();
return 0;
}
16 changes: 16 additions & 0 deletions tests/test_link_common.hpp
@@ -0,0 +1,16 @@
#ifndef _TEST_LINK_COMMON_HPP_
#define _TEST_LINK_COMMON_HPP_

#include <iostream>

#include <qtaround/debug.hpp>
#include <qtaround/error.hpp>
#include <qtaround/json.hpp>
#include <qtaround/os.hpp>
#include <qtaround/subprocess.hpp>
#include <qtaround/sys.hpp>
#include <qtaround/util.hpp>

void utest_dummy();

#endif // _TEST_LINK_COMMON_HPP_

0 comments on commit 456de4e

Please sign in to comment.