From 4b2a5696ce280f064866922f4e9c6e82dd35b47a Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Sat, 4 Oct 2014 18:56:37 -0700 Subject: [PATCH] fixed unit tests --- src/test/netbase_tests.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp index d4db69479e..174e864edf 100644 --- a/src/test/netbase_tests.cpp +++ b/src/test/netbase_tests.cpp @@ -4,6 +4,7 @@ #include #include "netbase.h" +#include "net.h" using namespace std; @@ -11,12 +12,12 @@ BOOST_AUTO_TEST_SUITE(netbase_tests) BOOST_AUTO_TEST_CASE(cnode_tests) { - CNode cn; - BOOST_CHECK(nc.HasFulfilledRequest('test1') == false); - nc.FulfilledRequest('test1'); - BOOST_CHECK(nc.HasFulfilledRequest('test1') == true); - nc.FulfilledRequest('test1'); - BOOST_CHECK(nc.HasFulfilledRequest('test1') == true); + CNode nc(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices)); + BOOST_CHECK(nc.HasFulfilledRequest("test1") == false); + nc.FulfilledRequest("test1"); + BOOST_CHECK(nc.HasFulfilledRequest("test1") == true); + nc.FulfilledRequest("test1"); + BOOST_CHECK(nc.HasFulfilledRequest("test1") == true); } BOOST_AUTO_TEST_CASE(netbase_networks)