Fix tests.
This commit is contained in:
@@ -87,7 +87,7 @@ fn test_constant_mut() -> Result<(), Box<EvalAltResult>> {
|
||||
"
|
||||
)
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorAssignmentToConstant(..)
|
||||
EvalAltResult::ErrorNonPureMethodCallOnConstant(..)
|
||||
));
|
||||
|
||||
let mut scope = Scope::new();
|
||||
@@ -120,7 +120,7 @@ fn test_constant_mut() -> Result<(), Box<EvalAltResult>> {
|
||||
*engine
|
||||
.run_with_scope(&mut scope, "MY_NUMBER.value = 42;")
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorAssignmentToConstant(..)
|
||||
EvalAltResult::ErrorNonPureMethodCallOnConstant(..)
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
@@ -119,7 +119,7 @@ fn test_plugins_package() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
assert!(
|
||||
matches!(*engine.run("const A = [1, 2, 3]; A.test(42);").expect_err("should error"),
|
||||
EvalAltResult::ErrorAssignmentToConstant(x, ..) if x == "array")
|
||||
EvalAltResult::ErrorNonPureMethodCallOnConstant(x, ..) if x == "test")
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user