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

Method assertForInputType

test/org/apache/pig/test/TestBuiltin.java:2902–2923  ·  view source on GitHub ↗
(String inputType, String assertMsg, Object expected, Object actual)

Source from the content-addressed store, hash-verified

2900 }
2901
2902 private void assertForInputType(String inputType, String assertMsg, Object expected, Object actual) {
2903 if (inputType == "ByteArray") {
2904 assertEquals(assertMsg, expected, actual);
2905 } else if (inputType == "Long") {
2906 assertEquals(assertMsg, expected, actual);
2907 } else if (inputType == "Integer") {
2908 assertEquals(assertMsg, expected, actual);
2909 } else if (inputType == "Double") {
2910 assertEquals(assertMsg, expected, actual);
2911 } else if (inputType == "Float") {
2912 assertEquals(assertMsg, expected, actual);
2913 } else if (inputType == "BigDecimal") {
2914 assertEquals(assertMsg, ((BigDecimal)expected).toPlainString(), ((BigDecimal)expected).toPlainString());
2915 } else if (inputType == "BigInteger") {
2916 assertEquals(assertMsg, ((BigInteger)expected).toString(), ((BigInteger)actual).toString());
2917 } else if (inputType == "String") {
2918 assertEquals(assertMsg, expected, actual);
2919 } else if (inputType == "DateTime") {
2920 // Compare millis so that we dont have to worry about TZ
2921 assertEquals(assertMsg, ((DateTime)expected).getMillis(), ((DateTime)actual).getMillis());
2922 }
2923 }
2924
2925 @Test
2926 public void testKeySet() throws Exception {

Callers 8

testMINMethod · 0.95
testMINIntermediateMethod · 0.95
testMINFinalMethod · 0.95
testMINAccumulateMethod · 0.95
testMAXMethod · 0.95
testMAXIntermedMethod · 0.95
testMAXFinalMethod · 0.95
testMAXAccumulateMethod · 0.95

Calls 2

assertEqualsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected