darwin 333
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/*
|
||||
#ifdef __APPLE__
|
||||
#include <machine/endian.h>
|
||||
#include <libkern/OSByteOrder.h>
|
||||
@@ -51,7 +52,7 @@
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
|
||||
*/
|
||||
EhSolverCancelledException solver_cancelled;
|
||||
|
||||
template<unsigned int N, unsigned int K>
|
||||
|
||||
@@ -38,8 +38,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
libzcash::JSOutput(addr, 50),
|
||||
libzcash::JSOutput(addr, 50)
|
||||
};
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||
#endif
|
||||
|
||||
{
|
||||
auto jsdesc = JSDescription::Randomized(
|
||||
@@ -48,12 +53,22 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
std::set<uint64_t> inputSet(inputMap.begin(), inputMap.end());
|
||||
std::set<uint64_t> expectedInputSet {0, 1};
|
||||
#else
|
||||
std::set<size_t> inputSet(inputMap.begin(), inputMap.end());
|
||||
std::set<size_t> expectedInputSet {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputSet, inputSet);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
std::set<uint64_t> outputSet(outputMap.begin(), outputMap.end());
|
||||
std::set<uint64_t> expectedOutputSet {0, 1};
|
||||
#else
|
||||
std::set<size_t> outputSet(outputMap.begin(), outputMap.end());
|
||||
std::set<size_t> expectedOutputSet {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedOutputSet, outputSet);
|
||||
}
|
||||
|
||||
@@ -64,8 +79,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false, GenZero);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> expectedInputMap {1, 0};
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {1, 0};
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> expectedInputMap {1, 0};
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {1, 0};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputMap, inputMap);
|
||||
EXPECT_EQ(expectedOutputMap, outputMap);
|
||||
}
|
||||
@@ -77,8 +97,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false, GenMax);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> expectedInputMap {0, 1};
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {0, 1};
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> expectedInputMap {0, 1};
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputMap, inputMap);
|
||||
EXPECT_EQ(expectedOutputMap, outputMap);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
#include "serialize.h"
|
||||
#include "uint256.h"
|
||||
#include "consensus/consensus.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <boost/array.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user