Fabcoin Core
0.16.2
P2P Digital Currency
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
cpp-ethereum
test
external-dependencies
boost.cpp
Go to the documentation of this file.
1
/*
2
This file is part of cpp-ethereum.
3
4
cpp-ethereum is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
cpp-ethereum is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
16
*/
23
#include <boost/test/unit_test.hpp>
24
#include <
libdevcore/Common.h
>
25
#include <
test/libtesteth/TestHelper.h
>
26
27
using namespace
dev::test
;
28
29
BOOST_FIXTURE_TEST_SUITE
(ExtDepBoost,
TestOutputHelper
)
30
31
// test that reproduces issue https://github.com/ethereum/cpp-ethereum/issues/1977
32
BOOST_AUTO_TEST_CASE
(u256_overflow_test)
33
{
34
dev::u256
a
= 14;
35
dev::bigint
b
=
dev::bigint
(
"115792089237316195423570985008687907853269984665640564039457584007913129639948"
);
36
// to fix cast `a` to dev::bigint
37
BOOST_CHECK
(a < b);
38
}
39
40
BOOST_AUTO_TEST_SUITE_END
()
dev::bigint
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<>> bigint
Definition:
Common.h:121
dev::test::TestOutputHelper
Definition:
TestOutputHelper.h:30
a
#define a(i)
dev::test
Definition:
Block.h:43
dev::u256
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
Definition:
Common.h:125
b
#define b(i, j)
dev::test::BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(rndCode)
Definition:
fuzzHelper.cpp:409
Common.h
BOOST_FIXTURE_TEST_SUITE
#define BOOST_FIXTURE_TEST_SUITE(a, b)
Definition:
object.cpp:14
BOOST_AUTO_TEST_SUITE_END
#define BOOST_AUTO_TEST_SUITE_END()
Definition:
object.cpp:16
TestHelper.h
Helper functions to work with json::spirit and test files.
BOOST_CHECK
#define BOOST_CHECK(expr)
Definition:
object.cpp:17
Generated on Mon Oct 22 2018 15:15:29 for Fabcoin Core by
1.8.11