From ee18f047b4369706bb58e55a1f2b16eeaff8a647 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 30 Mar 2020 16:18:33 +0800 Subject: [PATCH] Fix test. --- tests/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/types.rs b/tests/types.rs index 78018482..437c7678 100644 --- a/tests/types.rs +++ b/tests/types.rs @@ -1,4 +1,4 @@ -use rhai::{Engine, EvalAltResult}; +use rhai::{Engine, EvalAltResult, RegisterFn, INT}; #[test] fn test_type_of() -> Result<(), EvalAltResult> { @@ -32,7 +32,7 @@ fn test_type_of() -> Result<(), EvalAltResult> { #[cfg(not(feature = "no_object"))] { - engine.register_type::("Hello"); + engine.register_type_with_name::("Hello"); engine.register_fn("new_ts", || TestStruct { x: 1 }); assert_eq!(engine.eval::("type_of(new_ts())")?, "Hello");