311312313314315316317318319320321
// make sure this does nothing m1.decode(); assertTrue(m1.size() == 0); byte[] bytes = m1.serialize(); HMapIDW m2 = HMapIDW.create(bytes); assertTrue(m2.size() == 0); }
5758596061626364656667
HMapIDW m1 = new HMapIDW(); m1.put(3, 5.0); m1.put(4, 22.0); byte[] bytes = m1.serialize(); HMapIDW n2 = HMapIDW.create(bytes); double value; assertEquals(n2.size(), 2);
HMapIFW m1 = new HMapIFW(); m1.put(3, 5.0f); m1.put(4, 22.0f); byte[] bytes = m1.serialize(); HMapIFW n2 = HMapIFW.create(bytes); float value; assertEquals(n2.size(), 2);
8283848586878889909192
HMapIFW m1 = new HMapIFW(); m1.put(3, 5.0f); m1.put(4, 22.0f); byte[] bytes = m1.serialize(); HMapIFW m2 = HMapIFW.create(bytes); assertFalse(m2.isDecoded()); assertEquals(2, m2.size());
121122123124125126127128129130131
158159160161162163164165166167168
HMapIFW m1 = new HMapIFW(); m1.put(3, 5.0f); m1.put(4, 22.0f); byte[] bytes1 = m1.serialize(); HMapIFW m2 = new HMapIFW(); m2.put(3, 1.0f); m2.put(4, 1.0f); m2.put(5, 1.0f);
165166167168169170171172173174175
HMapIFW m2 = new HMapIFW(); m2.put(3, 1.0f); m2.put(4, 1.0f); m2.put(5, 1.0f); byte[] bytes2 = m2.serialize(); HMapIFW n1 = HMapIFW.create(bytes1); HMapIFW n2 = HMapIFW.create(bytes2); assertFalse(n1.isDecoded());
195196197198199200201202203204205
202203204205206207208209210211212
233234235236237238239240241242243