MCPcopy Create free account
hub / github.com/apache/pig / testBytesToMap

Method testBytesToMap

test/org/apache/pig/test/TestConversions.java:208–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 @Test
209 public void testBytesToMap() throws IOException
210 {
211 ResourceFieldSchema fs = GenRandomData.getRandMapFieldSchema();
212
213 for (int i = 0; i < MAX; i++) {
214 Map<String, Object> m = GenRandomData.genRandMap(r,5);
215 String expectedMapString = DataType.mapToString(m);
216 Map<String, Object> convertedMap = ps.getLoadCaster().bytesToMap(expectedMapString.getBytes(), fs);
217 assertTrue(TestHelper.mapEquals(m, convertedMap));
218 }
219
220 }
221
222 @Test
223 public void testBooleanToBytes() throws IOException {

Callers

nothing calls this directly

Calls 7

getRandMapFieldSchemaMethod · 0.95
genRandMapMethod · 0.95
mapToStringMethod · 0.95
mapEqualsMethod · 0.95
bytesToMapMethod · 0.65
getLoadCasterMethod · 0.65
getBytesMethod · 0.65

Tested by

no test coverage detected