Commit 6e072460 authored by Simon Giesecke's avatar Simon Giesecke

Problem: errno not output on test failure

Solution: use appropriate test assertion macro
parent 669fc4df
...@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <unity.h> #include <unity.h>
#include "../tests/testutil.hpp" #include "../tests/testutil.hpp"
#include "../tests/testutil_unity.hpp"
#include "../unittests/unittest_resolver_common.hpp" #include "../unittests/unittest_resolver_common.hpp"
#include <ip_resolver.hpp> #include <ip_resolver.hpp>
...@@ -150,10 +151,11 @@ static void test_resolve (zmq::ip_resolver_options_t opts_, ...@@ -150,10 +151,11 @@ static void test_resolve (zmq::ip_resolver_options_t opts_,
int rc = resolver.resolve (&addr, name_); int rc = resolver.resolve (&addr, name_);
if (expected_addr_ == NULL) { if (expected_addr_ == NULL) {
// TODO also check the expected errno
TEST_ASSERT_EQUAL (-1, rc); TEST_ASSERT_EQUAL (-1, rc);
return; return;
} else { } else {
TEST_ASSERT_EQUAL (0, rc); TEST_ASSERT_SUCCESS_ERRNO (rc);
} }
validate_address (family, &addr, expected_addr_, expected_port_, validate_address (family, &addr, expected_addr_, expected_port_,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment