Commit 039843d5 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

addressed review comments: describe the intent of Base32HexTest.decodeMap

in more detail.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac256@2528 e5f2f494-b856-4b98-b285-d166d9295462
parent 54ef101b
......@@ -118,6 +118,19 @@ TEST_F(Base32HexTest, encode) {
TEST_F(Base32HexTest, decodeMap) {
string input(8, '0'); // input placeholder
// We're going to populate an input string with only the last character
// not equal to the zero character ('0') for each valid base32hex encoding
// character. Decoding that input should result in a data stream with
// the last byte equal to the numeric value represented by the that
// character. For example, we'll generate and confirm the following:
// "00000000" => should be 0 (as a 40bit integer)
// "00000001" => should be 1 (as a 40bit integer)
// ...
// "0000000V" => should be 31 (as a 40bit integer)
// We also check the use of an invalid character for the last character
// surely fails. '=' should be accepted as a valid padding in this
// context; space characters shouldn't be allowed in this context.
for (int i = 0; i < 256; ++i) {
input[7] = i;
......
......@@ -95,6 +95,7 @@ TEST_F(HexTest, decodeHex) {
TEST_F(HexTest, decodeMap) {
string input("00"); // input placeholder
// See Base32HexTest.decodeMap for details of the following tests.
for (int i = 0; i < 256; ++i) {
input[1] = i;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment