aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-11-03 14:46:34 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-11-11 10:31:08 +1000
commitfeaec80cb033bd3db754c783ad483fc67751ec92 (patch)
tree72c1ccbf5a76672c5d8569fad4a407bbf6f9fe10
parent358ce2664d27da5bd8ae4c80655368219dcf18b3 (diff)
Test alerts high at high PROTOCOL_VERSIONs
I regenerated the alert test data; now alerts are tested against a protocol version way above the current protocol version. So we won't have to regenerate them every time we bump PROTOCOL_VERSION in the future.
-rw-r--r--src/test/alert_tests.cpp10
-rw-r--r--src/test/data/alertTests.rawbin1283 -> 1279 bytes
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index adfbec9dec..a7e668222d 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -27,7 +27,7 @@
alert.nID = 1;
alert.nCancel = 0; // cancels previous messages up to this ID number
alert.nMinVer = 0; // These versions are protocol versions
- alert.nMaxVer = 70001;
+ alert.nMaxVer = 999001;
alert.nPriority = 1;
alert.strComment = "Alert comment";
alert.strStatusBar = "Alert 1";
@@ -121,25 +121,25 @@ BOOST_AUTO_TEST_CASE(AlertApplies)
// Matches:
BOOST_CHECK(alerts[0].AppliesTo(1, ""));
- BOOST_CHECK(alerts[0].AppliesTo(70001, ""));
+ BOOST_CHECK(alerts[0].AppliesTo(999001, ""));
BOOST_CHECK(alerts[0].AppliesTo(1, "/Satoshi:11.11.11/"));
BOOST_CHECK(alerts[1].AppliesTo(1, "/Satoshi:0.1.0/"));
- BOOST_CHECK(alerts[1].AppliesTo(70001, "/Satoshi:0.1.0/"));
+ BOOST_CHECK(alerts[1].AppliesTo(999001, "/Satoshi:0.1.0/"));
BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.1.0/"));
BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.2.0/"));
// Don't match:
BOOST_CHECK(!alerts[0].AppliesTo(-1, ""));
- BOOST_CHECK(!alerts[0].AppliesTo(70002, ""));
+ BOOST_CHECK(!alerts[0].AppliesTo(999002, ""));
BOOST_CHECK(!alerts[1].AppliesTo(1, ""));
BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0"));
BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.1.0"));
BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0/"));
BOOST_CHECK(!alerts[1].AppliesTo(-1, "/Satoshi:0.1.0/"));
- BOOST_CHECK(!alerts[1].AppliesTo(70002, "/Satoshi:0.1.0/"));
+ BOOST_CHECK(!alerts[1].AppliesTo(999002, "/Satoshi:0.1.0/"));
BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.2.0/"));
BOOST_CHECK(!alerts[2].AppliesTo(1, "/Satoshi:0.3.0/"));
diff --git a/src/test/data/alertTests.raw b/src/test/data/alertTests.raw
index 7fc4528961..01f50680b9 100644
--- a/src/test/data/alertTests.raw
+++ b/src/test/data/alertTests.raw
Binary files differ