diff --git a/src/ripple/test/jtx/Env.h b/src/ripple/test/jtx/Env.h index 9744b4c488..72bb510399 100644 --- a/src/ripple/test/jtx/Env.h +++ b/src/ripple/test/jtx/Env.h @@ -346,6 +346,12 @@ public: void submit (JTx const& jt); + /** Check expected postconditions + of JTx submission. + */ + void + postconditions(JTx const& jt, TER ter, bool didApply); + /** Apply funclets and submit. */ /** @{ */ template diff --git a/src/ripple/test/jtx/impl/Env.cpp b/src/ripple/test/jtx/impl/Env.cpp index 8e5d101083..e4fb23b484 100644 --- a/src/ripple/test/jtx/impl/Env.cpp +++ b/src/ripple/test/jtx/impl/Env.cpp @@ -290,9 +290,15 @@ Env::submit (JTx const& jt) ter_ = temMALFORMED; didApply = false; } - if (jt.ter && ! test.expect(ter_ == *jt.ter, - "apply: " + transToken(ter_) + - " (" + transHuman(ter_) + ")")) + return postconditions(jt, ter_, didApply); +} + +void +Env::postconditions(JTx const& jt, TER ter, bool didApply) +{ + if (jt.ter && ! test.expect(ter == *jt.ter, + "apply: " + transToken(ter) + + " (" + transHuman(ter) + ")")) { test.log << pretty(jt.jv); // Don't check postconditions if