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

Method testRemoveTemporaries

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

Source from the content-addressed store, hash-verified

426 }
427
428 public void testRemoveTemporaries() throws Exception {
429 File dir = Native.getTempDir();
430 File tmp = new File(dir, Native.JNA_TMPLIB_PREFIX);
431 tmp.delete();
432 try {
433 assertTrue("Couldn't create temporary file " + tmp, tmp.createNewFile());
434 assertTrue("File isn't recognized as unpacked", Native.isUnpacked(tmp));
435 Native.markTemporaryFile(tmp);
436 Native.removeTemporaryFiles();
437 assertFalse("Temporary file still exists", tmp.exists());
438 }
439 finally {
440 tmp.delete();
441 }
442 }
443
444 private static final String NUL = "\0";
445 public void testStringConversion() {

Callers

nothing calls this directly

Calls 5

getTempDirMethod · 0.95
isUnpackedMethod · 0.95
markTemporaryFileMethod · 0.95
removeTemporaryFilesMethod · 0.95
deleteMethod · 0.45

Tested by

no test coverage detected