Skip to content

Commit e5dcbaa

Browse files
authored
Merge pull request #1431 from LLNL/bugfix/han12/slic_rank_info
Add unit testing for Slic ranks and rank counts
2 parents 7a295f3 + 34a2444 commit e5dcbaa

File tree

5 files changed

+561
-108
lines changed

5 files changed

+561
-108
lines changed

RELEASE-NOTES.md

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/
2929

3030
### Fixed
3131
- Added a guard for sidre-related mint API usage in a quest example
32+
- Removed `std::ends` usage from `SLIC_ASSERT`,`SLIC_ASSERT_MSG`,`SLIC_CHECK`,
33+
and `SLIC_CHECK_MSG` macros that prevented Lumberjack from combining
34+
messages.
3235

3336

3437
## [Version 0.10.0] - Release date 2024-09-27

src/axom/core/utilities/FileUtilities.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ void getDirName(std::string& dir, const std::string& path);
8888
* \param filename The name of the file.
8989
* \return 0 on success, -1 on failure. errno can obtain more information
9090
* about the failure.
91+
*
92+
* \note On Windows, this function calls _unlink() and will fail if there are
93+
* any open file handles to the specified file.
94+
* On Linux, this function calls unlink() and will succeed even if
95+
* there are open file handles to the specified file.
9196
*/
9297
int removeFile(const std::string& filename);
9398

src/axom/slic/interface/slic_macros.hpp

+39-39
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@
339339
if(!(EXP)) \
340340
{ \
341341
std::ostringstream __oss; \
342-
__oss << "Failed Assert: " << #EXP << std::ends; \
342+
__oss << "Failed Assert: " << #EXP; \
343343
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
344344
if(axom::slic::isAbortOnErrorsEnabled()) \
345345
{ \
@@ -365,19 +365,19 @@
365365
* \endcode
366366
*
367367
*/
368-
#define SLIC_ASSERT_MSG(EXP, msg) \
369-
do \
370-
{ \
371-
if(!(EXP)) \
372-
{ \
373-
std::ostringstream __oss; \
374-
__oss << "Failed Assert: " << #EXP << std::endl << msg << std::ends; \
375-
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
376-
if(axom::slic::isAbortOnErrorsEnabled()) \
377-
{ \
378-
axom::slic::abort(); \
379-
} \
380-
} \
368+
#define SLIC_ASSERT_MSG(EXP, msg) \
369+
do \
370+
{ \
371+
if(!(EXP)) \
372+
{ \
373+
std::ostringstream __oss; \
374+
__oss << "Failed Assert: " << #EXP << std::endl << msg; \
375+
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
376+
if(axom::slic::isAbortOnErrorsEnabled()) \
377+
{ \
378+
axom::slic::abort(); \
379+
} \
380+
} \
381381
} while(axom::slic::detail::false_value)
382382

383383
///@}
@@ -427,7 +427,7 @@
427427
if(!(EXP)) \
428428
{ \
429429
std::ostringstream __oss; \
430-
__oss << "Failed Check: " << #EXP << std::ends; \
430+
__oss << "Failed Check: " << #EXP; \
431431
if(axom::slic::debug::checksAreErrors) \
432432
{ \
433433
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
@@ -463,30 +463,30 @@
463463
* \endcode
464464
*
465465
*/
466-
#define SLIC_CHECK_MSG(EXP, msg) \
467-
do \
468-
{ \
469-
if(!(EXP)) \
470-
{ \
471-
std::ostringstream __oss; \
472-
__oss << "Failed Check: " << #EXP << std::endl << msg << std::ends; \
473-
if(axom::slic::debug::checksAreErrors) \
474-
{ \
475-
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
476-
if(axom::slic::isAbortOnErrorsEnabled()) \
477-
{ \
478-
axom::slic::abort(); \
479-
} \
480-
} \
481-
else \
482-
{ \
483-
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
484-
if(axom::slic::isAbortOnWarningsEnabled()) \
485-
{ \
486-
axom::slic::abort(); \
487-
} \
488-
} \
489-
} \
466+
#define SLIC_CHECK_MSG(EXP, msg) \
467+
do \
468+
{ \
469+
if(!(EXP)) \
470+
{ \
471+
std::ostringstream __oss; \
472+
__oss << "Failed Check: " << #EXP << std::endl << msg; \
473+
if(axom::slic::debug::checksAreErrors) \
474+
{ \
475+
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
476+
if(axom::slic::isAbortOnErrorsEnabled()) \
477+
{ \
478+
axom::slic::abort(); \
479+
} \
480+
} \
481+
else \
482+
{ \
483+
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
484+
if(axom::slic::isAbortOnWarningsEnabled()) \
485+
{ \
486+
axom::slic::abort(); \
487+
} \
488+
} \
489+
} \
490490
} while(axom::slic::detail::false_value)
491491

492492
/// @}

0 commit comments

Comments
 (0)