提交 2b5e2d4a 编写于 作者: M Matias Romeo

Use cpp_bin_float instead of cpp_dec_float

上级 366e70f8
......@@ -40,7 +40,7 @@ unsigned int test_math::test_double_api() {
res = double_eq(
double_div( i64_to_double(5), i64_to_double(9) ),
double_div( i64_to_double(10), i64_to_double(18) )
double_div( i64_to_double(5), i64_to_double(9) )
);
WASM_ASSERT(res == 1, "double_eq");
......
#include <boost/function.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <eos/chain/wasm_interface.hpp>
#include <eos/chain/chain_controller.hpp>
#include "Platform/Platform.h"
......@@ -17,7 +17,7 @@
namespace eos { namespace chain {
using namespace IR;
using namespace Runtime;
typedef boost::multiprecision::cpp_dec_float_50 DOUBLE;
typedef boost::multiprecision::cpp_bin_float_50 DOUBLE;
wasm_interface::wasm_interface() {
}
......
......@@ -328,6 +328,11 @@ BOOST_FIXTURE_TEST_CASE(test_all, testing_fixture)
BOOST_CHECK_EXCEPTION( CALL_TEST_FUNCTION( TEST_METHOD("test_math", "test_diveq_i128_by_0"), {}, {} ),
fc::assert_exception, is_assert_exception );
BOOST_CHECK_MESSAGE( CALL_TEST_FUNCTION( TEST_METHOD("test_math", "test_double_api"), {}, {} ) == WASM_TEST_PASS, "test_math::test_double_api()" );
BOOST_CHECK_EXCEPTION( CALL_TEST_FUNCTION( TEST_METHOD("test_math", "test_double_api_div_0"), {}, {} ),
fc::assert_exception, is_assert_exception );
//Test db (i64)
const auto& idx = chain_db.get_index<key_value_index, by_scope_primary>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册