You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug:
Some tests rely on assert for issuing errors, but there is no any handling of NDEBUG e.g. on CMake side. That may result in a worse test coverage for release builds.
To Reproduce:
The steps to reproduce the behavior (Windows as an example):
# Comment line in test_config.h to trigger an error:
// #define _PSTL_TEST_COMPLEX_OP_BROKEN (_MSVC_STL_VERSION && _MSVC_STL_VERSION <= _PSTL_TEST_LATEST_MSVC_STL_VERSION)# The error is detected in the debug build
cmake -GNinja -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=debug -DONEDPL_DEVICE_TYPE=CPU path\to\oneDPL
ninja run-asin.pass
1/1 Test #468: asin.pass ........................Exit code 0xc0000409***Exception: 0.99 sec
Assertion failed: std::isinf(r.imag()), file C:\repos\oneDPL\test\xpu_api\numerics\complex.number\complex.transcendentals\asin.pass.cpp, line 89
# The error is overlooked in the release build
cmake -GNinja -DCMAKE_CXX_COMPILER=icx -DCMAKE_BUILD_TYPE=release -DONEDPL_DEVICE_TYPE=CPU C:\repos\oneDPL
ninja run-asin.pass
1/1 Test #468: asin.pass ........................ Passed 0.84 sec# Adding "#undef NDEBUG" to the top of asin.pass.cpp results in the triggering of the assertion in the release build as well.
Expected Behavior:
The tests are equally covered in the release and debug builds.
The text was updated successfully, but these errors were encountered:
Describe the Bug:
Some tests rely on
assert
for issuing errors, but there is no any handling ofNDEBUG
e.g. on CMake side. That may result in a worse test coverage for release builds.To Reproduce:
The steps to reproduce the behavior (Windows as an example):
Expected Behavior:
The tests are equally covered in the release and debug builds.
The text was updated successfully, but these errors were encountered: