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

Method testIndexOf

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

Source from the content-addressed store, hash-verified

92 }
93
94 @Test
95 public void testIndexOf() throws IOException {
96 INDEXOF indexOf = new INDEXOF();
97 Tuple testTuple = Util.buildTuple("xyz", "");
98 assertEquals( ((Integer) "xyz".indexOf("")), indexOf.exec(testTuple));
99
100 testTuple = Util.buildTuple(null, null);
101 assertNull(indexOf.exec(testTuple));
102
103 testTuple = Util.buildTuple("xyz", "y");
104 assertEquals( ((Integer) "xyz".indexOf("y")), indexOf.exec(testTuple));
105
106 testTuple = Util.buildTuple("xyz", "abc");
107 assertEquals( ((Integer) "xyz".indexOf("abc")), indexOf.exec(testTuple));
108 }
109
110 @Test
111 public void testLastIndexOf() throws IOException {

Callers

nothing calls this directly

Calls 3

buildTupleMethod · 0.95
execMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected