| 423 | |
| 424 | |
| 425 | static int luaB_assert (lua_State *L) { |
| 426 | if (l_likely(lua_toboolean(L, 1))) /* condition is true? */ |
| 427 | return lua_gettop(L); /* return all arguments */ |
| 428 | else { /* error */ |
| 429 | luaL_checkany(L, 1); /* there must be a condition */ |
| 430 | lua_remove(L, 1); /* remove it */ |
| 431 | lua_pushliteral(L, "assertion failed!"); /* default message */ |
| 432 | lua_settop(L, 1); /* leave only message (default if no other one) */ |
| 433 | return luaB_error(L); /* call 'error' */ |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | |
| 438 | static int luaB_select (lua_State *L) { |
nothing calls this directly
no test coverage detected