Lines Matching refs:ATF_REQUIRE
92 ATF_REQUIRE(!((expected == "base") ^ (is_available(state, "assert"))));
93 ATF_REQUIRE(!((expected == "string") ^
95 ATF_REQUIRE(!((expected == "table") ^
203 ATF_REQUIRE(luaL_dostring(raw(state), "test_variable = 3") == 0);
205 ATF_REQUIRE(lua_isnumber(raw(state), -1));
215 ATF_REQUIRE(lua_isnil(raw(state), -1));
224 ATF_REQUIRE(luaL_dostring(raw(state), "global_variable = 'hello'") == 0);
228 ATF_REQUIRE(lua_isstring(raw(state), -1));
229 ATF_REQUIRE(std::strcmp("hello", lua_tostring(raw(state), -1)) == 0);
239 ATF_REQUIRE(luaL_dostring(raw(state), "meta = { foo = 567 }; "
242 ATF_REQUIRE(state.get_metafield(-1, "foo"));
243 ATF_REQUIRE(lua_isnumber(raw(state), -1));
254 ATF_REQUIRE(luaL_dostring(raw(state), "meta = { foo = 567 }; "
257 ATF_REQUIRE(!state.get_metafield(-1, "bar"));
267 ATF_REQUIRE(luaL_dostring(raw(state), "meta = { foo = 567 }; "
270 ATF_REQUIRE(state.get_metatable());
271 ATF_REQUIRE(lua_istable(raw(state), -1));
274 ATF_REQUIRE(lua_isnumber(raw(state), -1));
285 ATF_REQUIRE(luaL_dostring(raw(state), "meta = { foo = 567 }; "
289 ATF_REQUIRE(state.get_metatable(-2));
290 ATF_REQUIRE(lua_istable(raw(state), -1));
293 ATF_REQUIRE(lua_isnumber(raw(state), -1));
303 ATF_REQUIRE(luaL_dostring(raw(state), "t = {}") == 0);
305 ATF_REQUIRE(!state.get_metatable(-1));
314 ATF_REQUIRE(luaL_dostring(raw(state), "t = { a = 1, bar = 234 }") == 0);
318 ATF_REQUIRE(lua_isnumber(raw(state), -1));
340 ATF_REQUIRE(luaL_dostring(raw(state),
345 ATF_REQUIRE(lua_isnil(raw(state), -1));
384 ATF_REQUIRE(!state.is_boolean());
393 ATF_REQUIRE(!state.is_boolean());
395 ATF_REQUIRE(state.is_boolean());
405 ATF_REQUIRE(state.is_boolean(-1));
407 ATF_REQUIRE(!state.is_boolean(-1));
408 ATF_REQUIRE(state.is_boolean(-2));
417 ATF_REQUIRE(!state.is_function());
428 ATF_REQUIRE(!state.is_function());
430 ATF_REQUIRE(state.is_function());
442 ATF_REQUIRE(state.is_function(-1));
444 ATF_REQUIRE(!state.is_function(-1));
445 ATF_REQUIRE(state.is_function(-2));
454 ATF_REQUIRE(state.is_nil());
463 ATF_REQUIRE(state.is_nil());
465 ATF_REQUIRE(!state.is_nil());
475 ATF_REQUIRE(state.is_nil(-1));
477 ATF_REQUIRE(!state.is_nil(-1));
478 ATF_REQUIRE(state.is_nil(-2));
487 ATF_REQUIRE(!state.is_number());
496 ATF_REQUIRE(!state.is_number());
498 ATF_REQUIRE(state.is_number());
508 ATF_REQUIRE(!state.is_number(-1));
510 ATF_REQUIRE(state.is_number(-1));
511 ATF_REQUIRE(!state.is_number(-2));
520 ATF_REQUIRE(!state.is_string());
529 ATF_REQUIRE(!state.is_string());
531 ATF_REQUIRE(state.is_string());
533 ATF_REQUIRE(state.is_string());
543 ATF_REQUIRE(state.is_string(-1));
545 ATF_REQUIRE(!state.is_string(-1));
546 ATF_REQUIRE(state.is_string(-2));
548 ATF_REQUIRE(state.is_string(-1));
549 ATF_REQUIRE(!state.is_string(-2));
550 ATF_REQUIRE(state.is_string(-3));
559 ATF_REQUIRE(!state.is_table());
570 ATF_REQUIRE(!state.is_table());
572 ATF_REQUIRE(state.is_table());
584 ATF_REQUIRE(!state.is_table(-1));
586 ATF_REQUIRE(state.is_table(-1));
587 ATF_REQUIRE(!state.is_table(-2));
596 ATF_REQUIRE(!state.is_userdata());
606 ATF_REQUIRE(!state.is_userdata());
608 ATF_REQUIRE(state.is_userdata());
619 ATF_REQUIRE(!state.is_userdata(-1));
621 ATF_REQUIRE(state.is_userdata(-1));
622 ATF_REQUIRE(!state.is_userdata(-2));
636 ATF_REQUIRE(lua_pcall(raw(state), 0, 0, 0) == 0);
638 ATF_REQUIRE(std::strcmp("oh yes", lua_tostring(raw(state), -1)) == 0);
669 ATF_REQUIRE(lua_pcall(raw(state), 0, 1, 0) == 0);
689 ATF_REQUIRE(lua_istable(raw(state), -1));
701 ATF_REQUIRE(lua_isuserdata(raw(state), -1));
715 ATF_REQUIRE(!state.next(-3));
729 ATF_REQUIRE(state.next());
731 ATF_REQUIRE(lua_isnumber(raw(state), -2));
733 ATF_REQUIRE(lua_isnumber(raw(state), -1));
737 ATF_REQUIRE(state.next());
739 ATF_REQUIRE(lua_isnumber(raw(state), -2));
741 ATF_REQUIRE(lua_isnumber(raw(state), -1));
745 ATF_REQUIRE(!state.next());
840 ATF_REQUIRE(lua_toboolean(raw(state), -1));
843 ATF_REQUIRE(!lua_toboolean(raw(state), -1));
844 ATF_REQUIRE(lua_toboolean(raw(state), -2));
857 ATF_REQUIRE(luaL_dostring(raw(state),
871 ATF_REQUIRE(luaL_dostring(raw(state), "return cxx_divide(17, 3)") == 0);
885 ATF_REQUIRE(luaL_dostring(raw(state), "return cxx_divide(15, 0)") != 0);
898 ATF_REQUIRE(luaL_dostring(raw(state), "return cxx_divide(-3, -1)") != 0);
911 ATF_REQUIRE(luaL_dostring(raw(state), "return fail(900)") != 0);
915 ATF_REQUIRE(luaL_dostring(raw(state), "return fail(8192)") != 0);
942 ATF_REQUIRE(lua_isnil(raw(state), -1));
945 ATF_REQUIRE(!lua_isnil(raw(state), -1));
946 ATF_REQUIRE(lua_isnil(raw(state), -2));
1009 ATF_REQUIRE(luaL_dostring(
1014 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1026 ATF_REQUIRE(luaL_dostring(
1032 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1045 ATF_REQUIRE(luaL_dostring(
1051 ATF_REQUIRE(luaL_dostring(raw(state), "return t.foo") == 0);
1052 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1064 ATF_REQUIRE(luaL_dostring(
1071 ATF_REQUIRE(luaL_dostring(raw(state), "return t.foo") == 0);
1072 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1088 ATF_REQUIRE(luaL_dostring(raw(state),
1090 ATF_REQUIRE(lua_isboolean(raw(state), -1));
1091 ATF_REQUIRE(lua_toboolean(raw(state), -1));
1102 ATF_REQUIRE(luaL_dostring(raw(state), "return test_variable + 1") == 0);
1103 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1113 ATF_REQUIRE(luaL_dostring(
1125 ATF_REQUIRE(luaL_dostring(raw(state), "return numbers + 2") == 0);
1126 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1136 ATF_REQUIRE(luaL_dostring(
1149 ATF_REQUIRE(luaL_dostring(raw(state), "return numbers + 2") == 0);
1150 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1160 ATF_REQUIRE(luaL_dostring(raw(state), "t = { a = 1, bar = 234 }") == 0);
1170 ATF_REQUIRE(lua_isnumber(raw(state), -1));
1176 ATF_REQUIRE(lua_isstring(raw(state), -1));
1201 ATF_REQUIRE(state.to_boolean());
1203 ATF_REQUIRE(!state.to_boolean());
1214 ATF_REQUIRE(!state.to_boolean(-2));
1215 ATF_REQUIRE(state.to_boolean(-1));
1309 ATF_REQUIRE(luaL_dostring(raw(state),