()
| 120 | } |
| 121 | |
| 122 | public void testStringReturn() throws UnsupportedEncodingException { |
| 123 | // String with german umlauts |
| 124 | String input = "Hallo äöüß"; |
| 125 | |
| 126 | String result; |
| 127 | Memory mem = new Memory(32); |
| 128 | mem.clear(); |
| 129 | mem.write(0, input.getBytes("UTF-8"), 0, input.getBytes("UTF-8").length); |
| 130 | result = libUTF8Interface.returnStringArgument(mem); |
| 131 | assertEquals(input, result); |
| 132 | mem.clear(); |
| 133 | mem.write(0, input.getBytes("ISO-8859-1"), 0, input.getBytes("ISO-8859-1").length); |
| 134 | result = libLatin1Interface.returnStringArgument(mem); |
| 135 | assertEquals(input, result); |
| 136 | } |
| 137 | |
| 138 | public void testStringReturnDirect() throws UnsupportedEncodingException { |
| 139 | // String with german umlauts |
nothing calls this directly
no test coverage detected