Skip to content

Commit 01dcf8e

Browse files
committed
add tests for api availability
1 parent 19985af commit 01dcf8e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function on_test()
2+
assert(world ~= nil, "World was not found")
3+
assert(world:get_type_by_name("TestComponent") ~= nil, "Could not find TestComponent type")
4+
Entity.from_raw(1)
5+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
assert(world ~= nil, "World was not found")
2+
assert(world:get_type_by_name("TestComponent") ~= nil, "Could not find TestComponent type")
3+
Entity.from_raw(1)

crates/languages/bevy_mod_scripting_lua/tests/lua_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Test {
111111
(),
112112
Entity::from_raw(1),
113113
&(self.name()).into(),
114-
&CallbackLabel::new("test").ok_or("invalid callback label")?,
114+
&CallbackLabel::new("on_test").ok_or("invalid callback label")?,
115115
&mut lua,
116116
&context_settings.context_pre_handling_initializers,
117117
&mut (),

0 commit comments

Comments
 (0)