Add BOOST_TEST_CONTEXT to distinguish sprout v. sapling

This commit is contained in:
Eirik Ogilvie-Wigley
2018-06-19 10:06:21 -06:00
parent 3182b4abc3
commit 115b26cb27

View File

@@ -432,9 +432,13 @@ template<typename Tree> void anchorPopRegressionTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchor_pop_regression_test) BOOST_AUTO_TEST_CASE(anchor_pop_regression_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorPopRegressionTestImpl<ZCIncrementalMerkleTree>(SPROUT); anchorPopRegressionTestImpl<ZCIncrementalMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") {
anchorPopRegressionTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING); anchorPopRegressionTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING);
} }
}
template<typename Tree> void anchorRegressionTestImpl(ShieldedType type) template<typename Tree> void anchorRegressionTestImpl(ShieldedType type)
{ {
@@ -520,9 +524,13 @@ template<typename Tree> void anchorRegressionTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchor_regression_test) BOOST_AUTO_TEST_CASE(anchor_regression_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorRegressionTestImpl<ZCIncrementalMerkleTree>(SPROUT); anchorRegressionTestImpl<ZCIncrementalMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") {
anchorRegressionTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING); anchorRegressionTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING);
} }
}
BOOST_AUTO_TEST_CASE(nullifiers_test) BOOST_AUTO_TEST_CASE(nullifiers_test)
{ {
@@ -579,9 +587,13 @@ template<typename Tree> void anchorsFlushImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchors_flush_test) BOOST_AUTO_TEST_CASE(anchors_flush_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorsFlushImpl<ZCIncrementalMerkleTree>(SPROUT); anchorsFlushImpl<ZCIncrementalMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") {
anchorsFlushImpl<ZCSaplingIncrementalMerkleTree>(SAPLING); anchorsFlushImpl<ZCSaplingIncrementalMerkleTree>(SAPLING);
} }
}
BOOST_AUTO_TEST_CASE(chained_joinsplits) BOOST_AUTO_TEST_CASE(chained_joinsplits)
{ {
@@ -733,9 +745,13 @@ template<typename Tree> void anchorsTestImpl(ShieldedType type)
BOOST_AUTO_TEST_CASE(anchors_test) BOOST_AUTO_TEST_CASE(anchors_test)
{ {
BOOST_TEST_CONTEXT("Sprout") {
anchorsTestImpl<ZCIncrementalMerkleTree>(SPROUT); anchorsTestImpl<ZCIncrementalMerkleTree>(SPROUT);
}
BOOST_TEST_CONTEXT("Sapling") {
anchorsTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING); anchorsTestImpl<ZCSaplingIncrementalMerkleTree>(SAPLING);
} }
}
static const unsigned int NUM_SIMULATION_ITERATIONS = 40000; static const unsigned int NUM_SIMULATION_ITERATIONS = 40000;