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:
parent
8285257518
commit
89370eef92
@ -302,5 +302,10 @@ public class TestBytes extends TestCase {
|
|||||||
fail("Illegal string access: " + ex.getMessage());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user