14 #define GETTEXT_DOMAIN "wesnoth-test"
16 #include <boost/test/unit_test.hpp>
26 #pragma GCC diagnostic ignored "-Wold-style-cast"
55 BOOST_CHECK_EQUAL(fegetround(), FE_TONEAREST);
58 double d2 = 6755399441055744.0;
59 BOOST_CHECK_EQUAL(d1 + d2, 6755399441055745.0);
67 BOOST_CHECK_EQUAL(
lua_round(L, -2.5), -2);
68 BOOST_CHECK_EQUAL(
lua_round(L, -1.5), -2);
88 BOOST_AUTO_TEST_SUITE_END()
LUALIB_API lua_Integer luaL_checkinteger(lua_State *L, int narg)
BOOST_AUTO_TEST_SUITE(test_map_location)
BOOST_AUTO_TEST_CASE(fpu_rounding)
static int lua_round(lua_State *L, double d)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
static int lua_round3(double d)
#define LUA_IEEEENDIANLOC
#define lua_number2int(i, n)
static int lua_round2(double d)