| 373 | |
| 374 | |
| 375 | static int luaB_assert (lua_State *L) { |
| 376 | if (lua_toboolean(L, 1)) /* condition is true? */ |
| 377 | return lua_gettop(L); /* return all arguments */ |
| 378 | else { /* error */ |
| 379 | luaL_checkany(L, 1); /* there must be a condition */ |
| 380 | lua_remove(L, 1); /* remove it */ |
| 381 | lua_pushliteral(L, "assertion failed!"); /* default message */ |
| 382 | lua_settop(L, 1); /* leave only message (default if no other one) */ |
| 383 | return luaB_error(L); /* call 'error' */ |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | |
| 388 | static int luaB_select (lua_State *L) { |
nothing calls this directly
no test coverage detected