Add full optimization level for aggressive optimizing.

This commit is contained in:
Stephen Chung
2020-03-15 22:39:58 +08:00
parent f80e499e84
commit 372321dfe3
14 changed files with 512 additions and 272 deletions

View File

@@ -32,13 +32,13 @@ fn test_mismatched_op_custom_type() {
.eval::<INT>("60 + new_ts()")
.expect_err("expects error");
match r {
#[cfg(feature = "only_i32")]
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "+ (i32, TestStruct)" => (),
#[cfg(feature = "only_i32")]
assert!(
matches!(r, EvalAltResult::ErrorFunctionNotFound(err, _) if err == "+ (i32, TestStruct)")
);
#[cfg(not(feature = "only_i32"))]
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "+ (i64, TestStruct)" => (),
_ => panic!(),
}
#[cfg(not(feature = "only_i32"))]
assert!(
matches!(r, EvalAltResult::ErrorFunctionNotFound(err, _) if err == "+ (i64, TestStruct)")
);
}