aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-01-04 21:40:52 -0500
committerGavin Andresen <gavinandresen@gmail.com>2012-01-13 10:22:23 -0500
commit922e8e2929a2e78270868385aa46f96002fbcff3 (patch)
treed7c7d2b3fe89bc18b8d0f1137980b9db16db3ae8 /src/test/util_tests.cpp
parentd11a58a2d39b90dfe27d3a696b3977b87d7c8113 (diff)
Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 9571c47382..94c0c77a44 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -232,4 +232,19 @@ BOOST_AUTO_TEST_CASE(util_ParseMoney)
BOOST_CHECK(!ParseMoney("92233720368.54775808", ret));
}
+BOOST_AUTO_TEST_CASE(util_IsHex)
+{
+ BOOST_CHECK(IsHex("00"));
+ BOOST_CHECK(IsHex("00112233445566778899aabbccddeeffAABBCCDDEEFF"));
+ BOOST_CHECK(IsHex("ff"));
+ BOOST_CHECK(IsHex("FF"));
+
+ BOOST_CHECK(!IsHex(""));
+ BOOST_CHECK(!IsHex("0"));
+ BOOST_CHECK(!IsHex("a"));
+ BOOST_CHECK(!IsHex("eleven"));
+ BOOST_CHECK(!IsHex("00xx00"));
+ BOOST_CHECK(!IsHex("0x0000"));
+}
+
BOOST_AUTO_TEST_SUITE_END()