From: Stefan B. <bo...@us...> - 2003-03-31 08:37:35
|
Update of /cvsroot/ant-contrib/cpptasks/test/junit/net/sf/antcontrib/cpptasks In directory sc8-pr-cvs1:/tmp/cvs-serv16180/test/junit/net/sf/antcontrib/cpptasks Modified Files: TestTargetHistoryTable.java Log Message: cleanup temporary files Index: TestTargetHistoryTable.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/test/junit/net/sf/antcontrib/cpptasks/TestTargetHistoryTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestTargetHistoryTable.java 31 Mar 2003 08:22:07 -0000 1.4 --- TestTargetHistoryTable.java 31 Mar 2003 08:37:31 -0000 1.5 *************** *** 99,102 **** --- 99,104 ---- */ public void testUpdateTimeResolution() throws IOException { + File compiledFile = null; + try { // // delete any history file that might exist *************** *** 111,115 **** // create a dummy compiled unit // ! File compiledFile = new File(tempDir, "dummy.o"); FileOutputStream compiledStream = new FileOutputStream(compiledFile); compiledStream.close(); --- 113,117 ---- // create a dummy compiled unit // ! compiledFile = new File(tempDir, "dummy.o"); FileOutputStream compiledStream = new FileOutputStream(compiledFile); compiledStream.close(); *************** *** 134,137 **** --- 136,144 ---- assertTrue("History file was not created", historyFile.exists()); assertTrue("History file was empty", historyFile.length() > 10); + } finally { + if (compiledFile != null && compiledFile.exists()) { + compiledFile.delete(); + } + } } |