mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Reinitialize state in between individual unit tests.
This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include "serialize.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "test/test_bitcoin.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
|
||||
@@ -41,7 +43,7 @@ CService ip(uint32_t i)
|
||||
return CService(CNetAddr(s), Params().GetDefaultPort());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(DoS_tests)
|
||||
BOOST_FIXTURE_TEST_SUITE(DoS_tests, TestingSetup)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(DoS_banning)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user