mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refine json object test for NDEBUG case
This commit is contained in:
committed by
Nik Bougalis
parent
b2f2d89a08
commit
5741a8356f
@@ -209,13 +209,17 @@ public:
|
||||
|
||||
void testKeyFailure ()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
setup ("repeating keys");
|
||||
auto& root = makeRoot();
|
||||
root.set ("foo", "bar");
|
||||
root.set ("baz", 0);
|
||||
auto fail = [&]() { root.set ("foo", "bar"); };
|
||||
expectException (fail);
|
||||
// setting key again throws in !NDEBUG builds
|
||||
auto set_again = [&]() { root.set ("foo", "bar"); };
|
||||
#ifdef NDEBUG
|
||||
set_again();
|
||||
pass();
|
||||
#else
|
||||
expectException (set_again);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user