MCPcopy Index your code
hub / github.com/java-native-access/jna / testGetBytesWithCharset

Method testGetBytesWithCharset

test/com/sun/jna/NativeTest.java:471–475  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

469 }
470
471 public void testGetBytesWithCharset() throws Exception {
472 final Charset CHARSET_UTF8 = Charset.forName("UTF-8");
473 byte[] buf = Native.getBytes(getName() + UNICODE, CHARSET_UTF8);
474 assertEquals("Incorrect native bytes from Java String", getName() + UNICODE, new String(buf, CHARSET_UTF8));
475 }
476
477 public void testGetBytesBadEncoding() throws Exception {
478 byte[] buf = Native.getBytes(getName(), "unsupported");

Callers

nothing calls this directly

Calls 2

getBytesMethod · 0.95
getNameMethod · 0.65

Tested by

no test coverage detected