()
| 60 | } |
| 61 | |
| 62 | public void testTooManyArgs() { |
| 63 | NativeLibrary lib = NativeLibrary.getInstance(Platform.C_LIBRARY_NAME); |
| 64 | Function f = lib.getFunction("printf"); |
| 65 | Object[] args = new Object[Function.MAX_NARGS+1]; |
| 66 | // Make sure we don't break 'printf' |
| 67 | args[0] = getName(); |
| 68 | try { |
| 69 | f.invokeInt(args); |
| 70 | fail("Arguments should be limited to " + Function.MAX_NARGS); |
| 71 | } catch(UnsupportedOperationException e) { |
| 72 | // expected |
| 73 | } |
| 74 | assertEquals("Wrong result from 'printf'", getName().length(), f.invokeInt(new Object[] { getName() })); |
| 75 | } |
| 76 | |
| 77 | public void testUnsupportedReturnType() { |
| 78 | NativeLibrary lib = NativeLibrary.getInstance(Platform.C_LIBRARY_NAME); |
nothing calls this directly
no test coverage detected