fixed unit tests

This commit is contained in:
Evan Duffield 2014-10-04 18:56:37 -07:00
parent 0d283913fd
commit 4b2a5696ce

View File

@ -4,6 +4,7 @@
#include <vector>
#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)