diff options
author | acolyer <acolyer> | 2005-06-02 11:46:31 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-06-02 11:46:31 +0000 |
commit | 27c6150906667e299a6952bc4dda642aad00578d (patch) | |
tree | 4ccbc1e238ba018c51d1fa45d3bcceb2ebac9c90 /taskdefs/testsrc | |
parent | bedcb3ea08173f4b4ed837822e917e8dba6837d9 (diff) | |
download | aspectj-27c6150906667e299a6952bc4dda642aad00578d.tar.gz aspectj-27c6150906667e299a6952bc4dda642aad00578d.zip |
Andrew Huff's patch for the -log option
Diffstat (limited to 'taskdefs/testsrc')
-rw-r--r-- | taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java index d7019d061..fcc27eef1 100644 --- a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java +++ b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java @@ -301,35 +301,17 @@ public class AjcTaskTest extends TestCase { // verifies that the log attribute of AjcTask writes output to the given log file public void testLoggingMode() { AjcTask task = getTask("default.lst"); - File logFile = new File("testLogFile.txt"); + task.setFailonerror(false); + File logFile = new File("testLogFile1.txt"); + String s = logFile.getAbsolutePath(); logFile.delete(); - try { - logFile.createNewFile(); - } catch (IOException e) { - fail("unexpected " + e.getMessage()); - } long initialLength = logFile.length(); task.setLog(logFile); - checkRun(task, null); + runTest(task,null,null); long newLength = logFile.length(); assertTrue(newLength > initialLength); logFile.delete(); } - - // this test method submitted by patch from Andrew Huff (IBM) - // verifies that the log attribute of AjcTask appends output to the given log file - public void testLoggingIsAppending(){ - AjcTask task = getTask("compileError.lst"); - task.setFailonerror(false); - File logFile = new File("testLogFile.txt"); - task.setLog(logFile); - checkRun(task,null); - long oldLength = logFile.length(); - checkRun(task,null); - long newLength = logFile.length(); - assertTrue(newLength > oldLength); - logFile.delete(); - } private void checkRun(AjcTask task, String exceptionString) { try { |