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

Method testReplace

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

Source from the content-addressed store, hash-verified

124 }
125
126 @Test
127 public void testReplace() throws IOException {
128 REPLACE replace = new REPLACE();
129 Tuple testTuple = Util.buildTuple("foobar", "z", "x");
130 assertEquals("foobar".replace("z", "x"), replace.exec(testTuple));
131
132 // Use cached version of pattern in REPLACE
133 assertEquals("foobar".replace("z", "x"), replace.exec(testTuple));
134
135 testTuple = Util.buildTuple("foobar", "oo", "aa");
136 assertEquals("foobar".replace("oo", "aa"), replace.exec(testTuple));
137 }
138
139 @Test
140 public void testTrim() throws IOException {

Callers

nothing calls this directly

Calls 4

buildTupleMethod · 0.95
execMethod · 0.95
replaceMethod · 0.65
assertEqualsMethod · 0.45

Tested by

no test coverage detected