(String ionText, int codeUnitCount)
| 57 | } |
| 58 | |
| 59 | public void testEscape(String ionText, int codeUnitCount) |
| 60 | { |
| 61 | String ionData = wrap(ionText); |
| 62 | IonValue value = oneValue(ionData); |
| 63 | assertEquals(codeUnitCount, unwrap(value).length()); |
| 64 | |
| 65 | String printed = printed(ionText); |
| 66 | assertEquals(printed, value.toString()); |
| 67 | |
| 68 | // Try again after shoving the escape beyond the "short string" size |
| 69 | String spacer = "1234567890123456"; |
| 70 | ionText = spacer + ionText; |
| 71 | codeUnitCount += spacer.length(); |
| 72 | |
| 73 | ionData = wrap(ionText); |
| 74 | value = oneValue(ionData); |
| 75 | assertEquals(codeUnitCount, unwrap(value).length()); |
| 76 | |
| 77 | printed = printed(ionText); |
| 78 | assertEquals(printed, value.toString()); |
| 79 | } |
| 80 | } |
no test coverage detected