fix tests
This commit is contained in:
parent
dceb06133e
commit
765c34c52e
2 changed files with 17 additions and 2 deletions
|
|
@ -59,6 +59,12 @@ impl FromLua<'_> for BevyEntity {
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct BevyVec3(pub Vec3);
|
pub struct BevyVec3(pub Vec3);
|
||||||
|
|
||||||
|
impl BevyVec3 {
|
||||||
|
pub fn new(x: f32, y: f32, z: f32) -> Self {
|
||||||
|
BevyVec3(Vec3 { x, y, z })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl UserData for BevyVec3 {}
|
impl UserData for BevyVec3 {}
|
||||||
|
|
||||||
impl FromLua<'_> for BevyVec3 {
|
impl FromLua<'_> for BevyVec3 {
|
||||||
|
|
|
||||||
|
|
@ -554,6 +554,15 @@ mod rhai_tests {
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct BevyEntity(Entity);
|
struct BevyEntity(Entity);
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
struct BevyVec3(Vec3);
|
||||||
|
|
||||||
|
impl BevyVec3 {
|
||||||
|
fn new(x: f32, y: f32, z: f32) -> Self {
|
||||||
|
Self(Vec3 { x, y, z })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl AssertStateKeyValue for RhaiRuntime {
|
impl AssertStateKeyValue for RhaiRuntime {
|
||||||
type ScriptData = RhaiScriptData;
|
type ScriptData = RhaiScriptData;
|
||||||
|
|
||||||
|
|
@ -576,7 +585,7 @@ mod rhai_tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scripting_tests!(RhaiRuntime, "rhai", "rhai", BevyEntity);
|
scripting_tests!(RhaiRuntime, "rhai", "rhai", BevyEntity, BevyVec3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "lua")]
|
#[cfg(feature = "lua")]
|
||||||
|
|
@ -618,7 +627,7 @@ mod lua_tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scripting_tests!(LuaRuntime, "lua", "lua", BevyEntity);
|
scripting_tests!(LuaRuntime, "lua", "lua", BevyEntity, BevyVec3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ruby")]
|
#[cfg(feature = "ruby")]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue