Add only_i32 feature support

This commit is contained in:
J Henry Waugh 2020-08-09 11:47:11 -05:00
parent dc7b36fd11
commit a45b1d406f

View File

@ -42,6 +42,9 @@ fn test_generated_adds() -> Result<(), Box<EvalAltResult>> {
engine.load_package(m);
#[cfg(feature = "only_i32")]
assert_eq!(engine.eval::<INT>("let a = 0; add_i32(a, 1)")?, 1);
#[cfg(not(feature = "only_i32"))]
assert_eq!(engine.eval::<INT>("let a = 0; add_i64(a, 1)")?, 1);
Ok(())