Browse Source

Add a zcash-gtest binary to our build with a single tautological test.

pull/41/head
Nathan Wilcox 8 years ago
parent
commit
3ab0c1a790
  1. 1
      .gitignore
  2. 1
      src/Makefile.am
  3. 13
      src/Makefile.gtest.include
  4. 6
      src/gtest/main.cpp
  5. 5
      src/gtest/test_tautology.cpp

1
.gitignore

@ -4,6 +4,7 @@
src/bitcoin
src/zcashd
src/zcash-cli
src/zcash-gtest
src/bitcoin-tx
src/test/test_bitcoin
src/qt/test/test_bitcoin-qt

1
src/Makefile.am

@ -494,3 +494,4 @@ include Makefile.qttest.include
endif
include Makefile.zcash.include
include Makefile.gtest.include

13
src/Makefile.gtest.include

@ -0,0 +1,13 @@
bin_PROGRAMS += zcash-gtest
# tool for generating our public parameters
zcash_gtest_SOURCES = \
gtest/main.cpp \
gtest/test_tautology.cpp
zcash_gtest_LDADD = \
-lgtest \
$(LIBBITCOIN_UTIL)
zcash-gtest_check: zcash-gtest FORCE
./zcash-gtest

6
src/gtest/main.cpp

@ -0,0 +1,6 @@
#include "gtest/gtest.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

5
src/gtest/test_tautology.cpp

@ -0,0 +1,5 @@
#include <gtest/gtest.h>
TEST(tautologies, seven_eq_seven) {
ASSERT_EQ(7, 7);
}
Loading…
Cancel
Save