diff options
author | aclement <aclement> | 2006-08-22 08:20:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-08-22 08:20:36 +0000 |
commit | 50f8ecc4339442c7abaf4d3a9995c1434b768ef2 (patch) | |
tree | 75ca9caf60a4a9bd592b162dbc79146188fe1fc6 /tests/src/org/aspectj/systemtest/model/ModelTests.java | |
parent | 8b393cc90d5d63171154713e5a73044a1a2fddaf (diff) | |
download | aspectj-50f8ecc4339442c7abaf4d3a9995c1434b768ef2.tar.gz aspectj-50f8ecc4339442c7abaf4d3a9995c1434b768ef2.zip |
refactored tests for 154552 - use new model testing structure
Diffstat (limited to 'tests/src/org/aspectj/systemtest/model/ModelTests.java')
-rw-r--r-- | tests/src/org/aspectj/systemtest/model/ModelTests.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/model/ModelTests.java b/tests/src/org/aspectj/systemtest/model/ModelTests.java index 304321698..0ffa27a26 100644 --- a/tests/src/org/aspectj/systemtest/model/ModelTests.java +++ b/tests/src/org/aspectj/systemtest/model/ModelTests.java @@ -14,7 +14,9 @@ import java.io.File; import junit.framework.Test; +import org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder; import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.weaver.World; /** * Tests the model when there is no requirement on Java5 features. @@ -29,11 +31,42 @@ public class ModelTests extends ModelTestCase { // Switch this to true if you want to debug the comparison debugTest = false; } + + public void testAdviceInStructureModelWithAnonymousInnerClass_pr77269() {runModelTest("advice in structure model with anonymous inner class","pr77269_1");} + public void testAdviceInStructureModelWithNamedInnerClass_pr77269() {runModelTest("advice in structure model with named inner class","pr77269_2");} + public void testDWInStructureModelWithAnonymousInnerClass_pr77269() {runModelTest("declare warning in structure model with anonymous inner class","pr77269_3");} + public void testNewIProgramElementMethods_pr141730() {runModelTest("new iprogramelement methods","pr141730_1");} + + // if not filling in the model for aspects contained in jar files then + // want to ensure that the relationship map is correct and has nodes + // which can be used in AJDT - ensure no NPE occurs for the end of + // the relationship with aspectpath + public void testAspectPathRelWhenNotFillingInModel_pr141730() { + World.createInjarHierarchy = false; + try { + runModelTest("ensure aspectpath injar relationships are correct when not filling in model","pr141730_3"); + } finally { + World.createInjarHierarchy = true; + } + } + + public void testPCDInClassAppearsInModel_pr148027() { + boolean b = AsmHierarchyBuilder.shouldAddUsesPointcut; + AsmHierarchyBuilder.shouldAddUsesPointcut = true; + World.createInjarHierarchy = false; + try { + runModelTest("ensure pcd declare in class appears in model", "pr148027"); + } finally { + World.createInjarHierarchy = true; + AsmHierarchyBuilder.shouldAddUsesPointcut = b; + } + } public void testSourceLocationAndJarFile_pr145963() {runModelTest("sourcelocation and jar file","pr145963_1");} public void testSourceLocationAndClassFile_pr145963() {runModelTest("sourcelocation and class file","pr145963_2");} public void testAspectInDefaultPackage_pr145963() {runModelTest("aspect in default package", "pr145963_3");} public void testAspectInJavaFile_pr145963() {runModelTest("aspect in java file", "pr145963_4");} + ///////////////////////////////////////// public static Test suite() { |