From bf2c4bc8c719159b4ddd1b40e032c449424abd5d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 22:13:37 -0500 Subject: feat: distribution script fixed, improved linux compat, and extended network unit tests. Signed-off-by: Amlal El Mahrouss --- include/ocl/core/config.hpp | 10 +++++++--- include/ocl/net/modem.hpp | 3 +++ include/ocl/tests/hpptest.hpp | 17 ++++++++++++----- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/ocl/core/config.hpp b/include/ocl/core/config.hpp index 2ea1399..de1ce76 100644 --- a/include/ocl/core/config.hpp +++ b/include/ocl/core/config.hpp @@ -12,10 +12,14 @@ #include #include #include +#include -#include -#include -#include +#ifdef __cplusplus +/// DLL/Dylib/So specific macro. +# define OCL_EXPORT_DECL extern "C" BOOST_SYMBOL_EXPORT +#else +# define OCL_EXPORT_DECL +#endif namespace ocl { diff --git a/include/ocl/net/modem.hpp b/include/ocl/net/modem.hpp index 08d5ca5..29db748 100644 --- a/include/ocl/net/modem.hpp +++ b/include/ocl/net/modem.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #define OCL_MODEM_INTERFACE : public ocl::net::modem @@ -23,6 +24,8 @@ namespace ocl::net { + using namespace hpptest; + class modem; /// ============================================================================= diff --git a/include/ocl/tests/hpptest.hpp b/include/ocl/tests/hpptest.hpp index 0c7b4e5..0b5c54e 100644 --- a/include/ocl/tests/hpptest.hpp +++ b/include/ocl/tests/hpptest.hpp @@ -7,8 +7,11 @@ #pragma once +#include +#include #include -#include +#include +#include namespace ocl::hpptest { @@ -25,6 +28,10 @@ namespace ocl::hpptest } }; +#ifdef __linux__ + using errno_t = error_t; +#endif + struct posix_terminate final { template @@ -40,7 +47,7 @@ namespace ocl::hpptest typedef bool condition_type; template - consteval inline void must_be() + consteval inline void must_pass() { #ifdef OCL_HPPTEST OCL_HPPTEST_ASSERT(expr); @@ -48,7 +55,7 @@ namespace ocl::hpptest } template - inline void must_be(condition_type cond) noexcept + inline void must_pass(condition_type cond) noexcept { if (cond != expect) { @@ -57,7 +64,7 @@ namespace ocl::hpptest } template - inline void must_be(errno_t ern) noexcept + inline void must_pass(errno_t ern) noexcept { if (ern != expect) { @@ -79,7 +86,7 @@ namespace ocl::hpptest }; template - inline void must_be(HRESULT hr) noexcept + inline void must_pass(HRESULT hr) noexcept { if (hr != expect) { -- cgit v1.2.3