Skip to content

Commit

Permalink
Problem: test not using cppzmq
Browse files Browse the repository at this point in the history
Solution: add dependency on cppzmq
  • Loading branch information
sigiesec committed Mar 29, 2018
1 parent e5ca9a0 commit 07b583a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addons:
env:
matrix:
# - BUILD_TYPE=cmake DRAFT=enabled
- BUILD_TYPE=cmake
- BUILD_TYPE=cmake ZMQ_VERSION=4.2.5

matrix:
include:
Expand All @@ -41,4 +41,4 @@ script:
- ./ci_build.sh

after_success:
- coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/"
- coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/" -E ".*libzmq/"
4 changes: 2 additions & 2 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ install_zeromq() {

mkdir libzmq
cd libzmq
curl -L https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
tar -xvzf zeromq.tar.gz
cd zeromq-${ZMQ_VERSION}
cd libzmq-${ZMQ_VERSION}

mkdir build
cd build
Expand Down
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fetch_googletest(
${PROJECT_BINARY_DIR}/googletest
)

#find_package(cppzmq)
find_package(cppzmq)

enable_testing()

Expand All @@ -33,6 +33,7 @@ add_executable(
target_link_libraries(
unit_tests
gtest_main
libzmq
)

add_test(
Expand Down
9 changes: 5 additions & 4 deletions tests/example_add.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "gtest/gtest.h"
#include <zmq.hpp>

TEST(example, add)
TEST(create_context, add)
{
double res;
res = 1.0 + 2.0;
ASSERT_NEAR(res, 3.0, 1.0e-11);
zmq::context_t context;


}

0 comments on commit 07b583a

Please sign in to comment.