Fix tests.
This commit is contained in:
parent
d9a58907d9
commit
f323644e20
@ -17,7 +17,7 @@ impl Engine {
|
||||
///
|
||||
/// let engine = Engine::new();
|
||||
///
|
||||
/// engine.run::<i64>("print(40 + 2);")?;
|
||||
/// engine.run("print(40 + 2);")?;
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
@ -49,7 +49,7 @@ impl Engine {
|
||||
/// engine.run_with_scope(&mut scope, "x += 2; print(x);")?;
|
||||
///
|
||||
/// // The variable in the scope is modified
|
||||
/// assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);
|
||||
/// assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
@ -105,7 +105,7 @@ impl Engine {
|
||||
/// engine.run_ast_with_scope(&mut scope, &ast)?;
|
||||
///
|
||||
/// // The variable in the scope is modified
|
||||
/// assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);
|
||||
/// assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
|
@ -166,15 +166,12 @@ type ExclusiveRange = std::ops::Range<INT>;
|
||||
/// An inclusive integer range.
|
||||
type InclusiveRange = std::ops::RangeInclusive<INT>;
|
||||
|
||||
#[allow(deprecated)]
|
||||
pub use api::build_type::{CustomType, TypeBuilder};
|
||||
#[cfg(not(feature = "no_std"))]
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use api::files::{eval_file, run_file};
|
||||
pub use api::{
|
||||
build_type::{CustomType, TypeBuilder},
|
||||
eval::eval,
|
||||
events::VarDefInfo,
|
||||
run::run,
|
||||
};
|
||||
pub use api::{eval::eval, events::VarDefInfo, run::run};
|
||||
pub use ast::{FnAccess, AST};
|
||||
pub use engine::{Engine, OP_CONTAINS, OP_EQUALS};
|
||||
pub use eval::EvalContext;
|
||||
|
Loading…
Reference in New Issue
Block a user