Skip to content

Commit 07b583a

Browse files
committed
Problem: test not using cppzmq
Solution: add dependency on cppzmq
1 parent e5ca9a0 commit 07b583a

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ addons:
1818
env:
1919
matrix:
2020
# - BUILD_TYPE=cmake DRAFT=enabled
21-
- BUILD_TYPE=cmake
21+
- BUILD_TYPE=cmake ZMQ_VERSION=4.2.5
2222

2323
matrix:
2424
include:
@@ -41,4 +41,4 @@ script:
4141
- ./ci_build.sh
4242

4343
after_success:
44-
- coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/"
44+
- coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/" -E ".*libzmq/"

ci_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ install_zeromq() {
77

88
mkdir libzmq
99
cd libzmq
10-
curl -L https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
10+
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
1111
tar -xvzf zeromq.tar.gz
12-
cd zeromq-${ZMQ_VERSION}
12+
cd libzmq-${ZMQ_VERSION}
1313

1414
mkdir build
1515
cd build

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fetch_googletest(
2121
${PROJECT_BINARY_DIR}/googletest
2222
)
2323

24-
#find_package(cppzmq)
24+
find_package(cppzmq)
2525

2626
enable_testing()
2727

@@ -33,6 +33,7 @@ add_executable(
3333
target_link_libraries(
3434
unit_tests
3535
gtest_main
36+
libzmq
3637
)
3738

3839
add_test(

tests/example_add.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#include "gtest/gtest.h"
2+
#include <zmq.hpp>
23

3-
TEST(example, add)
4+
TEST(create_context, add)
45
{
5-
double res;
6-
res = 1.0 + 2.0;
7-
ASSERT_NEAR(res, 3.0, 1.0e-11);
6+
zmq::context_t context;
7+
8+
89
}

0 commit comments

Comments
 (0)