Skip to content

Commit 83f8548

Browse files
committed
Problem: no tests for socket_t ctor accepting enum socket_type
Solution: added test case
1 parent 1616c0f commit 83f8548

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,24 @@ matrix:
3131
# - llvm-toolchain-trusty-5.0
3232
# packages:
3333
# - clang-5.0
34+
- os: linux
35+
addons:
36+
apt:
37+
sources:
38+
- ubuntu-toolchain-r-test
39+
packages:
40+
- g++-7
41+
env:
42+
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=cmake ZMQ_VERSION=4.2.5
3443

3544
sudo: required
3645

3746
before_install:
3847
- pip install --user cpp-coveralls
3948

4049
# Build and check this project according to the BUILD_TYPE
41-
script:
50+
script:
51+
- eval "${MATRIX_EVAL}"
4252
- ./ci_build.sh
4353

4454
after_success:

tests/socket.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ TEST(socket, create_destroy)
77
zmq::socket_t socket(context, ZMQ_ROUTER);
88
}
99

10+
#ifdef ZMQ_CPP11
11+
TEST(socket, create_by_enum_destroy)
12+
{
13+
zmq::context_t context;
14+
zmq::socket_t socket(context, zmq::socket_type::router);
15+
}
16+
#endif

0 commit comments

Comments
 (0)