Browse Source

Only run wallet tests when wallet is enabled

pull/4/head
Jack Grigg 8 years ago
parent
commit
6daab5b4fc
No known key found for this signature in database GPG Key ID: 6A6914DAFBEA00DA
  1. 4
      src/Makefile.gtest.include
  2. 4
      src/gtest/test_keystore.cpp
  3. 0
      src/wallet/gtest/test_wallet_zkeys.cpp

4
src/Makefile.gtest.include

@ -11,7 +11,6 @@ zcash_gtest_SOURCES = \
gtest/json_test_vectors.cpp \
gtest/json_test_vectors.h \
gtest/test_foundersreward.cpp \
gtest/test_wallet_zkeys.cpp \
gtest/test_jsonspirit.cpp \
gtest/test_tautology.cpp \
gtest/test_equihash.cpp \
@ -31,7 +30,8 @@ zcash_gtest_SOURCES = \
gtest/test_checkblock.cpp
if ENABLE_WALLET
zcash_gtest_SOURCES += \
wallet/gtest/test_wallet.cpp
wallet/gtest/test_wallet.cpp \
wallet/gtest/test_wallet_zkeys.cpp
endif
zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC

4
src/gtest/test_keystore.cpp

@ -2,7 +2,9 @@
#include "keystore.h"
#include "random.h"
#ifdef ENABLE_WALLET
#include "wallet/crypter.h"
#endif
#include "zcash/Address.hpp"
TEST(keystore_tests, store_and_retrieve_spending_key) {
@ -44,6 +46,7 @@ TEST(keystore_tests, store_and_retrieve_note_decryptor) {
EXPECT_EQ(ZCNoteDecryption(sk.viewing_key()), decOut);
}
#ifdef ENABLE_WALLET
class TestCCryptoKeyStore : public CCryptoKeyStore
{
public:
@ -125,3 +128,4 @@ TEST(keystore_tests, store_and_retrieve_spending_key_in_encrypted_store) {
ASSERT_EQ(1, addrs.count(addr));
ASSERT_EQ(1, addrs.count(addr2));
}
#endif

0
src/gtest/test_wallet_zkeys.cpp → src/wallet/gtest/test_wallet_zkeys.cpp

Loading…
Cancel
Save