mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-20 14:58:54 +00:00
Add int64_axis.
This commit is contained in:
31
testing/test_asserts.cuh
Normal file
31
testing/test_asserts.cuh
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#define ASSERT(cond) \
|
||||
do \
|
||||
{ \
|
||||
if (cond) \
|
||||
{} \
|
||||
else \
|
||||
{ \
|
||||
fmt::print("{}:{}: Assertion failed ({}).\n", __FILE__, __LINE__, #cond); \
|
||||
exit(EXIT_FAILURE); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#define ASSERT_MSG(cond, msg) \
|
||||
do \
|
||||
{ \
|
||||
if (cond) \
|
||||
{} \
|
||||
else \
|
||||
{ \
|
||||
fmt::print("{}:{}: Test assertion failed ({}) {}\n", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#cond, \
|
||||
msg); \
|
||||
exit(EXIT_FAILURE); \
|
||||
} \
|
||||
} while (false)
|
||||
Reference in New Issue
Block a user