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

Method testStringSubstr

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

Source from the content-addressed store, hash-verified

47 private static final EvalFunc<String> stringSubstr_ = new SUBSTRING();
48
49 @Test
50 public void testStringSubstr() throws IOException {
51 Tuple testTuple = Util.buildTuple(null, 0, 2);
52 assertNull("null is null", stringSubstr_.exec(testTuple));
53
54 testTuple = Util.buildTuple("", 0, 2);
55 assertEquals("empty string", "", stringSubstr_.exec(testTuple));
56
57 testTuple = Util.buildTuple("abcde", 1, 3);
58 assertEquals("lowercase string", "bc", stringSubstr_.exec(testTuple));
59
60 testTuple = Util.buildTuple("abc", 0, 15);
61 assertEquals("uppercase string", "abc", stringSubstr_.exec(testTuple));
62 }
63
64 @Test
65 public void testStringSubstr_BI_EQ_EI() throws IOException {

Callers

nothing calls this directly

Calls 3

buildTupleMethod · 0.95
execMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected