mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
tests: Simplify code by removing unwarranted use of unique_ptr:s
This commit is contained in:
parent
e57e67057a
commit
d3d4892ef4
8 changed files with 8 additions and 9 deletions
|
|
@ -15,12 +15,11 @@
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
const static auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
SelectParams(CBaseChainParams::REGTEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
SelectParams(CBaseChainParams::REGTEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
SelectParams(CBaseChainParams::REGTEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
|
|
||||||
SelectParams(CBaseChainParams::REGTEST);
|
SelectParams(CBaseChainParams::REGTEST);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ static bool IsValidFlagCombination(unsigned flags);
|
||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
static const ECCVerifyHandle verify_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue