2023-06-05 00:16:05 +01:00
|
|
|
/* SPDX-License-Identifier: MPL-2.0 */
|
2016-05-08 18:25:03 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* File for adding tests for ancillary API methods and other miscellaenous
|
|
|
|
* API internals. Please ensure that when adding such tests into this file,
|
|
|
|
* that they are short-lived so they do not trigger timeouts in the
|
|
|
|
* CI build environments.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "testutil.hpp"
|
2018-08-20 11:53:09 +02:00
|
|
|
#include "testutil_unity.hpp"
|
2016-05-08 18:25:03 +01:00
|
|
|
|
2018-08-20 11:53:09 +02:00
|
|
|
void setUp ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void tearDown ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_version ()
|
2016-05-08 18:25:03 +01:00
|
|
|
{
|
|
|
|
int major, minor, patch;
|
|
|
|
|
|
|
|
zmq_version (&major, &minor, &patch);
|
2018-08-20 11:53:09 +02:00
|
|
|
TEST_ASSERT_EQUAL_INT (ZMQ_VERSION_MAJOR, major);
|
|
|
|
TEST_ASSERT_EQUAL_INT (ZMQ_VERSION_MINOR, minor);
|
|
|
|
TEST_ASSERT_EQUAL_INT (ZMQ_VERSION_PATCH, patch);
|
|
|
|
}
|
2016-05-08 18:25:03 +01:00
|
|
|
|
2018-08-20 11:53:09 +02:00
|
|
|
void test_strerrror ()
|
|
|
|
{
|
2019-03-23 07:53:38 -04:00
|
|
|
TEST_ASSERT_NOT_NULL (zmq_strerror (EINVAL));
|
2018-08-20 11:53:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
setup_test_environment ();
|
2016-05-08 18:25:03 +01:00
|
|
|
|
2018-08-20 11:53:09 +02:00
|
|
|
UNITY_BEGIN ();
|
|
|
|
RUN_TEST (test_version);
|
|
|
|
RUN_TEST (test_strerrror);
|
|
|
|
return UNITY_END ();
|
2016-05-08 18:25:03 +01:00
|
|
|
}
|