Commit 808be46
committed
Fix[bmqeval]: Correctly store eval error code
`SimpleEvaluator::Property::evaluate` contains special logic to store
evaluation error return codes in the context, using two range sentinel
enumerators `ErrorType::e_EVALUATION_FIRST` and
`ErrorType::e_EVALUATION_LAST`. However, as written, the condition to
check whether a return code is an evaluation error code is invariably
`false`. That is to say,
e_EVALUATION_FIRST <= rc <= e_EVALUATION_LAST
is always false, because `e_EVALUATION_FIRST = -1`, and
`e_EVALUATION_LAST = -4`. Return codes grow in the negative direction,
so the condition we want instead is
e_EVALUATION_LAST <= rc <= e_EVALUATION_FIRST.
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>1 parent 3f51a52 commit 808be46
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
0 commit comments