()
| 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 { |
nothing calls this directly
no test coverage detected