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

Method testLastIndexOf

test/org/apache/pig/test/TestStringUDFs.java:110–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 }
109
110 @Test
111 public void testLastIndexOf() throws IOException {
112 LAST_INDEX_OF lastIndexOf = new LAST_INDEX_OF();
113 Tuple testTuple = Util.buildTuple("xyz", "");
114 assertEquals( ((Integer) "xyz".lastIndexOf("")), lastIndexOf.exec(testTuple));
115
116 testTuple = Util.buildTuple(null, null);
117 assertNull(lastIndexOf.exec(testTuple));
118
119 testTuple = Util.buildTuple("xyzyy", "y");
120 assertEquals( ((Integer) "xyzyy".lastIndexOf("y")), lastIndexOf.exec(testTuple));
121
122 testTuple = Util.buildTuple("xyz", "abc");
123 assertEquals( ((Integer) "xyz".lastIndexOf("abc")), lastIndexOf.exec(testTuple));
124 }
125
126 @Test
127 public void testReplace() throws IOException {

Callers

nothing calls this directly

Calls 3

buildTupleMethod · 0.95
execMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected