diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2024-02-14 14:45:15 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2024-02-14 14:45:15 +0100 |
commit | 8ef7c069e3880cb944a8125ff2c855cf0bc48ac7 (patch) | |
tree | 918334333928ddcb658c3e0e3c0e5d1046077d19 | |
parent | ba976cb1b1a71b7c87c2003768d74db8c5afc3ff (diff) | |
download | fuzzer-8ef7c069e3880cb944a8125ff2c855cf0bc48ac7.tar.gz |
optionally assert state
-rwxr-xr-x | rtt-module.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rtt-module.js b/rtt-module.js index 6c35fd2..bd8a1ae 100755 --- a/rtt-module.js +++ b/rtt-module.js @@ -149,6 +149,16 @@ module.exports.fuzz = function(fuzzerInputData) { throw new UndoSeedError(`undo caused seed change from ${seed} to ${state.seed}`) } } + + if (RULES.assertState) { + try { + RULES.assertState(state) + } catch (e) { + log_crash(replay, state, view, step, active, action, args) + throw new RulesCrashError(e, e.stack) + } + } + step += 1 } } |