Fixup code to make sure all feature builds succeed.
This commit is contained in:
@@ -12,6 +12,7 @@ fn test_constant() -> Result<(), EvalAltResult> {
|
||||
Ok(_) => panic!("expecting compilation error"),
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
match engine.eval::<i64>("const x = [1, 2, 3, 4, 5]; x[2] = 42;") {
|
||||
Err(EvalAltResult::ErrorAssignmentToConstant(var, _)) if var == "x" => (),
|
||||
Err(err) => return Err(err),
|
||||
|
@@ -1,4 +1,7 @@
|
||||
use rhai::{Engine, EvalAltResult, FLOAT, INT};
|
||||
use rhai::{Engine, EvalAltResult, INT};
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use rhai::FLOAT;
|
||||
|
||||
#[test]
|
||||
fn test_power_of() -> Result<(), EvalAltResult> {
|
||||
|
Reference in New Issue
Block a user