Add actual header file for utilities in gtest/utils.cpp

It's not best practice to not use headers.
This commit is contained in:
Per Grön 2018-01-07 16:11:33 +01:00
parent 4109ee36b5
commit 5c4a47cbf8
5 changed files with 12 additions and 5 deletions

View File

@ -7,6 +7,7 @@ noinst_PROGRAMS += zcash-gtest
zcash_gtest_SOURCES = \
gtest/main.cpp \
gtest/utils.cpp \
gtest/utils.h \
gtest/test_checktransaction.cpp \
gtest/json_test_vectors.cpp \
gtest/json_test_vectors.h \

View File

@ -1,9 +1,7 @@
#include <gtest/gtest.h>
#include "random.h"
extern int GenZero(int n);
extern int GenMax(int n);
#include "gtest/utils.h"
TEST(Random, MappedShuffle) {
std::vector<int> a {8, 4, 6, 3, 5};

View File

@ -1,12 +1,11 @@
#include <gtest/gtest.h>
#include "gtest/utils.h"
#include "primitives/transaction.h"
#include "zcash/Note.hpp"
#include "zcash/Address.hpp"
extern ZCJoinSplit* params;
extern int GenZero(int n);
extern int GenMax(int n);
TEST(Transaction, JSDescriptionRandomized) {
// construct a merkle tree

View File

@ -1,3 +1,5 @@
#include "gtest/utils.h"
int GenZero(int n)
{
return 0;

7
src/gtest/utils.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef BITCOIN_GTEST_UTILS_H
#define BITCOIN_GTEST_UTILS_H
int GenZero(int n);
int GenMax(int n);
#endif