test: identify the dynamic missing-value comparison path
This commit is contained in:
@@ -16662,7 +16662,9 @@ mod tests {
|
|||||||
"symbol == \"000001.SZ\" && !(model_score > 0)",
|
"symbol == \"000001.SZ\" && !(model_score > 0)",
|
||||||
"symbol == \"000001.SZ\" && !(0 < model_score)",
|
"symbol == \"000001.SZ\" && !(0 < model_score)",
|
||||||
] {
|
] {
|
||||||
let error = strategy.eval_bool(&ctx, predicate, &day, Some(&missing_stock), None).unwrap_err();
|
let result = strategy.eval_bool(&ctx, predicate, &day, Some(&missing_stock), None);
|
||||||
|
assert!(result.is_err(), "{predicate}: {result:?}");
|
||||||
|
let error = result.unwrap_err();
|
||||||
assert!(error.to_string().contains("missing_numeric_operand"), "{error}");
|
assert!(error.to_string().contains("missing_numeric_operand"), "{error}");
|
||||||
}
|
}
|
||||||
assert!(!strategy.eval_bool(
|
assert!(!strategy.eval_bool(
|
||||||
|
|||||||
Reference in New Issue
Block a user