aboutsummaryrefslogtreecommitdiff
path: root/src/test/serialize_tests.cpp
diff options
context:
space:
mode:
authorBrandon Dahler <brandon.dahler@gmail.com>2013-04-13 00:13:08 -0500
committerBrandon Dahler <brandon.dahler@gmail.com>2013-11-10 09:36:28 -0600
commit51ed9ec971614aebdbfbd9527aba365dd0afd437 (patch)
treed2f910390e55aef857023812fbdaefdd66cd99ff /src/test/serialize_tests.cpp
parent7c4c207be8420d394a5abc4368d1bb69ad4f8067 (diff)
downloadbitcoin-51ed9ec971614aebdbfbd9527aba365dd0afd437.tar.xz
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.
Diffstat (limited to 'src/test/serialize_tests.cpp')
-rw-r--r--src/test/serialize_tests.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index 7e193c88ce..afcdd118bc 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -1,9 +1,8 @@
-#include <boost/test/unit_test.hpp>
+#include "serialize.h"
-#include <string>
-#include <vector>
+#include <stdint.h>
-#include "serialize.h"
+#include <boost/test/unit_test.hpp>
using namespace std;
@@ -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);
}