assertEquals(4, getRelationshipCount(p));
}
+ public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_pipelineOff() throws Exception {
+ String p = "pr307120";
+ initialiseProject(p);
+ configureNonStandardCompileOptions(p, "-Xset:pipelineCompilation=false");
+ build(p);
+ // Hid:1:(targets=1) =pr307120<{Test.java}Test)A.getFoo?field-get(int A.foo) (advised by) =pr307120<{Test.java}Test&before
+ // Hid:2:(targets=1) =pr307120<{A.java[A (aspect declarations) =pr307120<{Test.java}Test)A.getFoo
+ // Hid:3:(targets=1) =pr307120<{Test.java}Test&before (advises) =pr307120<{Test.java}Test)A.getFoo?field-get(int A.foo)
+ // Hid:4:(targets=1) =pr307120<{Test.java}Test)A.getFoo (declared on) =pr307120<{A.java[A
+ alter(p, "inc1");
+ assertEquals(4, getRelationshipCount(p));
+ build(p);
+ // Hid:1:(targets=1) =pr307120<{A.java[A (aspect declarations) =pr307120<{Test.java}Test)A.getFoo
+ // Hid:2:(targets=1) =pr307120<{Test.java}Test)A.getFoo (declared on) =pr307120<{A.java[A
+ // These two are missing without the fix:
+ // Hid:1:(targets=1) =pr307120<{Test.java}Test)A.getFoo?field-get(int A.foo) (advised by) =pr307120<{Test.java}Test&before
+ // Hid:7:(targets=1) =pr307120<{Test.java}Test&before (advises) =pr307120<{Test.java}Test)A.getFoo?field-get(int A.foo)
+ assertNoErrors(p);
+ assertEquals(4, getRelationshipCount(p));
+ }
+
+ // More sophisticated variant of above.
+ public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_2_pipelineOff() throws Exception {
+ String p = "pr307120_3";
+ initialiseProject(p);
+ configureNonStandardCompileOptions(p, "-Xset:pipelineCompilation=false");
+ build(p);
+ assertNoErrors(p);
+ // Hid:1:(targets=1) =pr307120_3<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString; (declared on)
+ // =pr307120_3<{Target.java[Target
+
+ // Hid:2:(targets=1) =pr307120_3<{Target.java[Target (aspect declarations)
+ // =pr307120_3<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;
+
+ // these are missing under this bug:
+
+ // Hid:3:(targets=1) =pr307120_3<{Advisor.java}Advisor&around&QObject;&QObject; (advises)
+ // =pr307120_3<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String Target.it)
+
+ // Hid:4:(targets=1) =pr307120_3<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String
+ // Target.it) (advised by) =pr307120_3<{Advisor.java}Advisor&around&QObject;&QObject;
+
+ assertEquals(4, getRelationshipCount(p));
+ alter(p, "inc1");
+ build(p);
+
+ assertEquals(4, getRelationshipCount(p));
+ assertNoErrors(p);
+ }
+
// More sophisticated variant of above.
public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_2() throws Exception {
String p = "pr307120_2";
initialiseProject(p);
build(p);
assertNoErrors(p);
- // Hid:2:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString; (declared on) =pr307120_2<{Target.java[Target
- // Hid:8:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt (declared on) =pr307120_2<{Target.java[Target
- // Hid:5:(targets=2) =pr307120_2<{Target.java[Target (aspect declarations) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt
- // Hid:6:(targets=2) =pr307120_2<{Target.java[Target (aspect declarations) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;
- // Hid:1:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String Target.it) (advised by) =pr307120_2<{Advisor.java}Advisor&around&QObject;&QObject;
- // Hid:3:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt?field-get(java.lang.String Target.it) (advised by) =pr307120_2<{Advisor.java}Advisor&around&QObject;
- // Hid:4:(targets=1) =pr307120_2<{Advisor.java}Advisor&around&QObject; (advises) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt?field-get(java.lang.String Target.it)
- // Hid:7:(targets=1) =pr307120_2<{Advisor.java}Advisor&around&QObject;&QObject; (advises) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String Target.it)
+ // Hid:2:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString; (declared on)
+ // =pr307120_2<{Target.java[Target
+ // Hid:8:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt (declared on)
+ // =pr307120_2<{Target.java[Target
+ // Hid:5:(targets=2) =pr307120_2<{Target.java[Target (aspect declarations)
+ // =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt
+ // Hid:6:(targets=2) =pr307120_2<{Target.java[Target (aspect declarations)
+ // =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;
+ // Hid:1:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String
+ // Target.it) (advised by) =pr307120_2<{Advisor.java}Advisor&around&QObject;&QObject;
+ // Hid:3:(targets=1) =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt?field-get(java.lang.String Target.it)
+ // (advised by) =pr307120_2<{Advisor.java}Advisor&around&QObject;
+ // Hid:4:(targets=1) =pr307120_2<{Advisor.java}Advisor&around&QObject; (advises)
+ // =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.getIt?field-get(java.lang.String Target.it)
+ // Hid:7:(targets=1) =pr307120_2<{Advisor.java}Advisor&around&QObject;&QObject; (advises)
+ // =pr307120_2<{TargetAugmenter.java}TargetAugmenter)Target.setIt)QString;?field-set(java.lang.String Target.it)
assertEquals(8, getRelationshipCount(p));
alter(p, "inc1");
build(p);
- assertEquals(8, getRelationshipCount(p));
+ assertEquals(8, getRelationshipCount(p));
assertNoErrors(p);
}
+ // // More sophisticated variant of above.
+ // public void testIncrementalAdvisingItdJoinpointsAccessingPrivFields_307120_4_pipelineOff() throws Exception {
+ // String p = "pr307120_4";
+ // initialiseProject(p);
+ // configureNonStandardCompileOptions(p, "-Xset:pipelineCompilation=false");
+ // build(p);
+ // assertNoErrors(p);
+ //
+ // printModel(p);
+ // assertEquals(4, getRelationshipCount(p));
+ // alter(p, "inc1");
+ // build(p);
+ //
+ // assertEquals(4, getRelationshipCount(p));
+ // assertNoErrors(p);
+ // }
+
// modified aspect so target is fully qualified on the incremental change
public void testIncrementalFqItds_280380_2() throws Exception {
String p = "pr280380";