Skip to content

Commit

Permalink
Add a zcash-gtest binary to our build with a single tautological test.
Browse files Browse the repository at this point in the history
  • Loading branch information
nejucomo committed Apr 18, 2016
1 parent 0ee1d5d commit 3ab0c1a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,4 @@ include Makefile.qttest.include
endif

include Makefile.zcash.include
include Makefile.gtest.include
13 changes: 13 additions & 0 deletions src/Makefile.gtest.include
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions src/gtest/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "gtest/gtest.h"

int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
5 changes: 5 additions & 0 deletions src/gtest/test_tautology.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <gtest/gtest.h>

TEST(tautologies, seven_eq_seven) {
ASSERT_EQ(7, 7);
}

0 comments on commit 3ab0c1a

Please sign in to comment.