diff options
author | acolyer <acolyer> | 2006-02-24 15:01:01 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2006-02-24 15:01:01 +0000 |
commit | 94635f33e7654b30139e987a7cd6aa360ca631e9 (patch) | |
tree | 1b4acb5fd02fde2ec2fe3f0c9ec50f3b7f3c661f /testing-drivers | |
parent | 66165173b34678ee428d4f4d791168f8cb5f231c (diff) | |
download | aspectj-94635f33e7654b30139e987a7cd6aa360ca631e9.tar.gz aspectj-94635f33e7654b30139e987a7cd6aa360ca631e9.zip |
Completed: Improve ajc memory usage
incremental tests need to ensure that AjState runs in incremental mode!
Diffstat (limited to 'testing-drivers')
-rw-r--r-- | testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java | 18 | ||||
-rw-r--r-- | testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java index d91419c15..17b6eeb21 100644 --- a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java +++ b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java @@ -12,6 +12,8 @@ package org.aspectj.testing.drivers; +import org.aspectj.ajdt.internal.core.builder.AjState; + import junit.framework.*; /* @@ -42,4 +44,20 @@ public class AjcHarnessTestsUsingJUnit extends TestCase { public AjcHarnessTestsUsingJUnit(String name) { super(name); } + + /* (non-Javadoc) + * @see junit.framework.TestCase#setUp() + */ + protected void setUp() throws Exception { + super.setUp(); + AjState.FORCE_INCREMENTAL_DURING_TESTING = true; + } + + /* (non-Javadoc) + * @see junit.framework.TestCase#tearDown() + */ + protected void tearDown() throws Exception { + super.tearDown(); + AjState.FORCE_INCREMENTAL_DURING_TESTING = false; + } } diff --git a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java index af326dbfa..b5eb7666c 100644 --- a/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java +++ b/testing-drivers/testsrc/org/aspectj/testing/drivers/AjctestsAdapter.java @@ -23,6 +23,7 @@ import junit.framework.TestCase; import junit.framework.TestResult; import junit.framework.TestSuite; +import org.aspectj.ajdt.internal.core.builder.AjState; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessageHolder; import org.aspectj.bridge.MessageHandler; @@ -388,11 +389,13 @@ public class AjctestsAdapter extends TestSuite { throw new Error("need to re-init"); } try { + AjState.FORCE_INCREMENTAL_DURING_TESTING = true; result.startTest(this); suite.runTest(this, result); } finally { result.endTest(this); suite = null; + AjState.FORCE_INCREMENTAL_DURING_TESTING = false; } } |