| 125 | } |
| 126 | |
| 127 | private static class FakeCharUtil implements CharUtilTest |
| 128 | { |
| 129 | public void newText ( String s ) |
| 130 | { |
| 131 | _strings.add( s ); |
| 132 | } |
| 133 | |
| 134 | public int numTexts ( ) |
| 135 | { |
| 136 | return _strings.size(); |
| 137 | } |
| 138 | |
| 139 | public String getText ( int i ) |
| 140 | { |
| 141 | return (String) _strings.get( i ); |
| 142 | } |
| 143 | |
| 144 | public int length ( int i ) |
| 145 | { |
| 146 | return ((String) _strings.get( i )).length(); |
| 147 | } |
| 148 | |
| 149 | public void insert ( int i, int j, int off ) |
| 150 | { |
| 151 | String si = (String) _strings.get( i ); |
| 152 | String sj = (String) _strings.get( j ); |
| 153 | |
| 154 | _strings.set( i, si.substring( 0, off ) + sj + si.substring( off ) ); |
| 155 | } |
| 156 | |
| 157 | public void remove ( int i, int off, int cch ) |
| 158 | { |
| 159 | String si = (String) _strings.get( i ); |
| 160 | |
| 161 | _strings.set( i, si.substring( 0, off ) + si.substring( off + cch ) ); |
| 162 | } |
| 163 | |
| 164 | ArrayList _strings = new ArrayList(); |
| 165 | } |
| 166 | |
| 167 | @Test |
| 168 | public void testCharUtil ( ) throws Exception |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…