The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
test_lua.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "scripting/lua_kernel_base.hpp"
#include "lua/lualib.h"
#include "lua/lauxlib.h"
#include "lua/llimits.h"
#include <fenv.h>
Include dependency graph for test_lua.cpp:

Go to the source code of this file.

Macros

#define GETTEXT_DOMAIN   "wesnoth-test"
 

Functions

static int lua_round (lua_State *L, double d)
 
static int lua_round2 (double d)
 
static int lua_round3 (double d)
 
 BOOST_AUTO_TEST_CASE (fpu_rounding)
 
 BOOST_AUTO_TEST_CASE (lua_rounding)
 

Macro Definition Documentation

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 14 of file test_lua.cpp.

Function Documentation

BOOST_AUTO_TEST_CASE ( fpu_rounding  )

Definition at line 52 of file test_lua.cpp.

BOOST_AUTO_TEST_CASE ( lua_rounding  )

Definition at line 62 of file test_lua.cpp.

References lua_kernel_base::get_state(), lua_round(), lua_round2(), and lua_round3().

static int lua_round ( lua_State L,
double  d 
)
static

Definition at line 30 of file test_lua.cpp.

References lua_pop, lua_pushnumber(), and luaL_checkinteger().

Referenced by BOOST_AUTO_TEST_CASE().

static int lua_round2 ( double  d)
static

Definition at line 38 of file test_lua.cpp.

References lua_number2int.

Referenced by BOOST_AUTO_TEST_CASE().

static int lua_round3 ( double  d)
static

Definition at line 45 of file test_lua.cpp.

References d, luai_Cast::l_d, luai_Cast::l_p, LUA_IEEEENDIANLOC, and LUAI_EXTRAIEEE.

Referenced by BOOST_AUTO_TEST_CASE().