2023-07-25 13:00:05 +08:00
|
|
|
#pragma once
|
2021-11-14 00:54:54 +08:00
|
|
|
|
|
|
|
#define assert_throw(code, exception) \
|
|
|
|
{ \
|
|
|
|
bool exceptionThrown = false; \
|
|
|
|
try \
|
|
|
|
{ \
|
|
|
|
code; \
|
|
|
|
} \
|
|
|
|
catch (const exception&) \
|
|
|
|
{ \
|
|
|
|
exceptionThrown = true; \
|
|
|
|
} \
|
|
|
|
assert(exceptionThrown); \
|
|
|
|
}
|