Home | History | Annotate | Download | only in dist

Lines Matching refs:lutok

53 hook_add(lutok::state& state)
70 hook_multiply(lutok::state& state)
83 lutok::state state;
84 std::map< std::string, lutok::cxx_function > members;
85 lutok::create_module(state, "my_math", members);
88 lutok::do_string(state, "return next(my_math) == nil", 1);
97 lutok::state state;
98 std::map< std::string, lutok::cxx_function > members;
100 lutok::create_module(state, "my_math", members);
102 lutok::do_string(state, "return my_math.add(10, 20)", 1);
111 lutok::state state;
112 std::map< std::string, lutok::cxx_function > members;
116 lutok::create_module(state, "my_math", members);
118 lutok::do_string(state, "return my_math.add(10, 20)", 1);
120 lutok::do_string(state, "return my_math.multiply(10, 20)", 1);
122 lutok::do_string(state, "return my_math.add2(20, 30)", 1);
135 lutok::state state;
136 ATF_REQUIRE_EQ(3, lutok::do_file(state, "test.lua", -1));
152 lutok::state state;
153 ATF_REQUIRE_EQ(0, lutok::do_file(state, "test.lua"));
165 lutok::state state;
166 ATF_REQUIRE_EQ(2, lutok::do_file(state, "test.lua", 2));
177 lutok::state state;
179 ATF_REQUIRE_THROW_RE(lutok::file_not_found_error, "missing.lua",
180 lutok::do_file(state, "missing.lua"));
191 lutok::state state;
193 ATF_REQUIRE_THROW_RE(lutok::error, "Failed to load Lua file 'test.lua'",
194 lutok::do_file(state, "test.lua"));
201 lutok::state state;
202 ATF_REQUIRE_EQ(3, lutok::do_string(state, "return 10, 20, 30", -1));
214 lutok::state state;
215 ATF_REQUIRE_EQ(0, lutok::do_string(state, "return 10, 20, 30"));
223 lutok::state state;
224 ATF_REQUIRE_EQ(2, lutok::do_string(state, "return 10, 20, 30", 2));
235 lutok::state state;
237 ATF_REQUIRE_THROW_RE(lutok::error, "Failed to process Lua string 'a b c'",
238 lutok::do_string(state, "a b c"));
245 lutok::state state;
247 lutok::eval(state, "3 + 10");
256 lutok::state state;
258 lutok::eval(state, "5, 8, 10", 3);
269 lutok::state state;
271 ATF_REQUIRE_THROW(lutok::error,
272 lutok::eval(state, "non_existent.method()"));