diff options
author | aclement <aclement> | 2008-06-13 23:23:23 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-13 23:23:23 +0000 |
commit | dad6ba44ca81c718ac5f62d71c5ee296080fce9b (patch) | |
tree | 1f0f23600e932f01e9cee74274b1d5f5b010b4f4 /org.aspectj.ajdt.core/testsrc | |
parent | 56222cd5bc1acb843613553c7e061ac0e74da9f5 (diff) | |
download | aspectj-dad6ba44ca81c718ac5f62d71c5ee296080fce9b.tar.gz aspectj-dad6ba44ca81c718ac5f62d71c5ee296080fce9b.zip |
102733: broken code support, wooo
Diffstat (limited to 'org.aspectj.ajdt.core/testsrc')
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/ProceedOnErrorTestCase.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/ProceedOnErrorTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/ProceedOnErrorTestCase.java index 570adf7aa..4caa987bd 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/ProceedOnErrorTestCase.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/ProceedOnErrorTestCase.java @@ -16,6 +16,8 @@ import java.io.File; import java.io.IOException; import java.util.Date; +import org.aspectj.ajdt.internal.core.builder.AjBuildManager; + public class ProceedOnErrorTestCase extends CommandTestCase { @@ -29,17 +31,22 @@ public class ProceedOnErrorTestCase extends CommandTestCase { * C2.java. */ public void testNoProceedOnError() throws IOException { - checkCompile("src1/C1.java", NO_ERRORS); - File f =new File(getSandboxName(),"C.class"); - long oldmodtime = f.lastModified(); - pause(2); - checkCompile("src1/C2.java", new int[]{1}); - f =new File(getSandboxName(),"C.class"); - long newmodtime = f.lastModified(); - // Without -proceedOnError supplied, we should *not* change the time stamp on the .class file - assertTrue("The .class file should not have been modified as '-proceedOnError' was not supplied (old="+ - new Date(oldmodtime).toString()+")(new="+new Date(newmodtime).toString()+")", - oldmodtime==newmodtime); + try { + AjBuildManager.continueWhenErrors=false; + checkCompile("src1/C1.java", NO_ERRORS); + File f =new File(getSandboxName(),"C.class"); + long oldmodtime = f.lastModified(); + pause(2); + checkCompile("src1/C2.java", new int[]{1}); + f =new File(getSandboxName(),"C.class"); + long newmodtime = f.lastModified(); + // Without -proceedOnError supplied, we should *not* change the time stamp on the .class file + assertTrue("The .class file should not have been modified as '-proceedOnError' was not supplied (old="+ + new Date(oldmodtime).toString()+")(new="+new Date(newmodtime).toString()+")", + oldmodtime==newmodtime); + } finally { + AjBuildManager.continueWhenErrors=true; + } } public void testProceedOnError() throws IOException { |