This patch implements the unit tests for deploymentinfo.h and deploymentinfo.cpp. These changes will improve test coverage and run within the unit test suite.
Test coverage: https://marcofalke.github.io/btc_cov/test_bitcoin.coverage/src/deploymentinfo.h.gcov.html https://marcofalke.github.io/btc_cov/test_bitcoin.coverage/src/deploymentinfo.cpp.gcov.html
Test execution excerpt:
test/deploymentinfo_tests.cpp(10): Entering test suite "deploymentinfo_tests"
test/deploymentinfo_tests.cpp(12): Entering test case "name_from_pos"
test/deploymentinfo_tests.cpp(15): info: check DeploymentName(Consensus::DEPLOYMENT_TESTDUMMY) == VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_TESTDUMMY].name has passed
test/deploymentinfo_tests.cpp(16): info: check DeploymentName(Consensus::DEPLOYMENT_TAPROOT) == VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_TAPROOT].name has passed
test/deploymentinfo_tests.cpp(12): Leaving test case "name_from_pos"; testing time: 7564us
test/deploymentinfo_tests.cpp(19): Entering test case "name_from_dep"
test/deploymentinfo_tests.cpp(22): info: check DeploymentName(Consensus::DEPLOYMENT_HEIGHTINCB) == "bip34" has passed
test/deploymentinfo_tests.cpp(23): info: check DeploymentName(Consensus::DEPLOYMENT_CLTV) == "bip65" has passed
test/deploymentinfo_tests.cpp(24): info: check DeploymentName(Consensus::DEPLOYMENT_DERSIG) == "bip66" has passed
test/deploymentinfo_tests.cpp(25): info: check DeploymentName(Consensus::DEPLOYMENT_CSV) == "csv" has passed
test/deploymentinfo_tests.cpp(26): info: check DeploymentName(Consensus::DEPLOYMENT_SEGWIT) == "segwit" has passed
test/deploymentinfo_tests.cpp(19): Leaving test case "name_from_dep"; testing time: 2011us
test/deploymentinfo_tests.cpp(10): Leaving test suite "deploymentinfo_tests"; testing time: 9707us