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

Method copyThenCompare

test/org/apache/pig/data/TestSchemaTuple.java:365–379  ·  view source on GitHub ↗
(SchemaTupleFactory tf)

Source from the content-addressed store, hash-verified

363 }
364
365 private void copyThenCompare(SchemaTupleFactory tf) throws ExecException {
366 SchemaTuple<?> st = tf.newTuple();
367 SchemaTuple<?> st2 = tf.newTuple();
368 fillWithData(st);
369 st2.set(st);
370 assertTrue(st.equals(st2));
371 assertEquals(st.compareTo(st2), 0);
372 st.set(0, null);
373 assertFalse(st.equals(st2));
374 assertEquals(st.compareTo(st2), -1);
375 assertTrue(st.isNull(0));
376 st2.set(0, null);
377 assertTrue(st.equals(st2));
378 assertEquals(st.compareTo(st2), 0);
379 }
380
381 /**
382 * This ensures that a fresh Tuple out of a TupleFactory

Callers 1

testNotAppendableMethod · 0.95

Calls 7

fillWithDataMethod · 0.95
newTupleMethod · 0.65
setMethod · 0.65
isNullMethod · 0.65
equalsMethod · 0.45
assertEqualsMethod · 0.45
compareToMethod · 0.45

Tested by

no test coverage detected