From feaec80cb033bd3db754c783ad483fc67751ec92 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Sun, 3 Nov 2013 14:46:34 +1000 Subject: [PATCH] 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. --- src/test/alert_tests.cpp | 10 +++++----- src/test/data/alertTests.raw | Bin 1283 -> 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 7fc45289617e1c4b0e40f2244ffa3fab0f9849ce..01f50680b95aa307a1a013b643ded4ae0bc47162 100644 GIT binary patch delta 633 zcmV-<0*3vA3jYa^A_G}I50ND!LxqfWw;S@{)&Y3;w^u{1?sDfliP4PDpAZjs4RU^d z$pRoRm4V=6zXU+&h_r9*Z*vFWf891fmfN&4Kyq3Cs&|lMkpUqCSw0VuuS7!{+0(`k zNhYa2rUCcr@YTUv-uVBvRuUCK+WJJk2}+CtAPpN_I@E8v=tZuFUintl&l~8)aUp@ zUm`BbuD&(`ATf^=g87GZ(T&>tjU1NZDX5|vVZWm)ebMJ7*F~UCHcXKL6q5}C4Fg#| z50f1NC`U#xL;@f#*Rq=*q!kH8@OG&`dnyHyemm`c1i!uG*D+PovaX~8AU8w2H$Nvs zT41Ja^PbA~V7ZWHz0Ctqm^7@&R%H-bCzFi=A_G}I50f1NE<%Tu{q|EZ-MQ$8_;$cx zXW3%=diB+jEX?@on6wyO(;xyMMh~mW!Ai!fEbt3iQ6suCpTF6jf3GSzyEz2H)+y87 zlOh9CLb*4;UE*aml`oG+jA3)t8#ezUM-sC&(S>fFnRu}6<^mv86DIjio&imfTihyR zn`96x8FAL!*$D7xp_ T10|D9eAIQ$P>(A*sE>gw!q^=z delta 642 zcmV-|0)74e34;odA_H*|0g)vmL+htH7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