mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
Problem: errno not output on test failure
Solution: use appropriate test assertion macro
This commit is contained in:
parent
669fc4df5a
commit
6e0724609a
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <unity.h>
|
||||
#include "../tests/testutil.hpp"
|
||||
#include "../tests/testutil_unity.hpp"
|
||||
#include "../unittests/unittest_resolver_common.hpp"
|
||||
|
||||
#include <ip_resolver.hpp>
|
||||
@ -150,10 +151,11 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
|
||||
int rc = resolver.resolve (&addr, name_);
|
||||
|
||||
if (expected_addr_ == NULL) {
|
||||
// TODO also check the expected errno
|
||||
TEST_ASSERT_EQUAL (-1, rc);
|
||||
return;
|
||||
} else {
|
||||
TEST_ASSERT_EQUAL (0, rc);
|
||||
TEST_ASSERT_SUCCESS_ERRNO (rc);
|
||||
}
|
||||
|
||||
validate_address (family, &addr, expected_addr_, expected_port_,
|
||||
|
Loading…
Reference in New Issue
Block a user