mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Cleanup code using forward declarations.
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "serialize.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(serialize_tests)
|
||||
@@ -21,7 +20,7 @@ BOOST_AUTO_TEST_CASE(varints)
|
||||
BOOST_CHECK(size == ss.size());
|
||||
}
|
||||
|
||||
for (uint64 i = 0; i < 100000000000ULL; i += 999999937) {
|
||||
for (uint64_t i = 0; i < 100000000000ULL; i += 999999937) {
|
||||
ss << VARINT(i);
|
||||
size += ::GetSerializeSize(VARINT(i), 0, 0);
|
||||
BOOST_CHECK(size == ss.size());
|
||||
@@ -34,8 +33,8 @@ BOOST_AUTO_TEST_CASE(varints)
|
||||
BOOST_CHECK_MESSAGE(i == j, "decoded:" << j << " expected:" << i);
|
||||
}
|
||||
|
||||
for (uint64 i = 0; i < 100000000000ULL; i += 999999937) {
|
||||
uint64 j = -1;
|
||||
for (uint64_t i = 0; i < 100000000000ULL; i += 999999937) {
|
||||
uint64_t j = -1;
|
||||
ss >> VARINT(j);
|
||||
BOOST_CHECK_MESSAGE(i == j, "decoded:" << j << " expected:" << i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user