HBASE-3444 Bytes.toBytesBinary and Bytes.toStringBinary() should be reversible

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1397703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-10-12 19:48:49 +00:00
parent 8285257518
commit 89370eef92
1 changed files with 5 additions and 0 deletions

View File

@ -302,5 +302,10 @@ public class TestBytes extends TestCase {
fail("Illegal string access: " + ex.getMessage());
}
}
public void testToStringBinary_toBytesBinary_Reversable() throws Exception {
String bytes = Bytes.toStringBinary(Bytes.toBytes(2.17));
assertEquals(2.17, Bytes.toDouble(Bytes.toBytesBinary(bytes)), 0);
}
}