Skip to content

Commit

Permalink
ITD inner type tests: replace '_' by '__'
Browse files Browse the repository at this point in the history
Classes and methods named '_' are no longer allowed in ECJ, obviously
also not for old target versions like 1.5. This probably is due to
the added support for unnamed patterns and classes in the latest
upstream JDT Core merge. Therefore, we simply rename '_' to '__'.

Signed-off-by: Alexander Kriegisch <[email protected]>
  • Loading branch information
kriegaex committed Feb 12, 2024
1 parent fcf0c35 commit 3e82099
Show file tree
Hide file tree
Showing 32 changed files with 87 additions and 94 deletions.
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/Construction.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
public class Construction {
public static void main(String []argv) {
new _();
new __();
System.out.println("done");
}
}

aspect XX {
public static class Construction._ {
public static class Construction.__ {
}
}
8 changes: 4 additions & 4 deletions tests/features169/itdInnerTypes/Construction3.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
aspect Aspect2 {
public static class Construction3._ {
public static class Construction3.__ {
String string;
public _(String string) { this.string = string;}
public __(String string) { this.string = string;}
public String toString() {
return string;
}
}
public static Construction3._ Construction3._() { return new _("abc"); }
public static Construction3.__ Construction3.__() { return new __("abc"); }
public static String Construction3.foo() { return "abc"; }
}
public class Construction3 {
public static void main(String []argv) {
Object o = _();
Object o = __();
o = foo();
System.out.println(o);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/features169/itdInnerTypes/Construction4.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
aspect Aspect1 {
public static Construction4._ Construction4._() { return new _("abc"); }
public static Construction4.__ Construction4.__() { return new __("abc"); }
public static String Construction4.foo() { return "abc"; }
}
aspect Aspect2 {
public static class Construction4._ {
public static class Construction4.__ {
String string;
public _(String string) { this.string = string;}
public __(String string) { this.string = string;}
public String toString() {
return string;
}
}
}
public class Construction4 {
public static void main(String []argv) {
Object o = _();
Object o = __();
o = foo();
System.out.println(o);
}
Expand Down
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/eight/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/eight/Underscorer.aj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package a.b.c;
public aspect Underscorer {
public int Vote.i = 5;
public String Vote.zzz() { return "abc"; }
public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public Ip ip = new Ip();
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
public class Ip {
public String fieldName() { return "ip"; }
Expand Down
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/eight/Vote.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Vote {

public static Vote._ _() { return new Vote._(null); }
public static Vote.__ __() { return new Vote.__(null); }

static class RealInner {}

Expand Down
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/five/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/five/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package a.b.c;

public aspect Vote_Amender {
public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public Ip ip = new Ip();
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
public class Ip {
public String fieldName() { return "ip"; }
Expand Down
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/four/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/four/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package a.b.c;

public aspect Vote_Amender {
public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
}
}
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/nine/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

6 changes: 3 additions & 3 deletions tests/features169/itdInnerTypes/nine/Underscorer.aj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package a.b.c;

public aspect Underscorer {
public Vote._ Vote._() { return new Vote._(null); }
public Vote.__ Vote.__() { return new Vote.__(null); }

public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public Ip ip = new Ip();
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
public class Ip {
public String fieldName() { return "ip"; }
Expand Down
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/nine/Vote.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Vote {

// public static Vote._ _() { return new Vote._(null); }
// public static Vote.__ __() { return new Vote.__(null); }

static class RealInner {}

Expand Down
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/one/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package a.b.c;

aspect Vote_Amender {
static class Vote._ {
static class Vote.__ {
}
}
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/separate/Basic.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
public class Basic {
public static void main(String []argv) {
new _();
new __();
System.out.println("done");
}
}

aspect XX {
public static class Basic._ {
public static class Basic.__ {
}
}
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/separate/Basic2.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public class Basic2 {
public static void main(String []argv) {
new Basic._();
new Basic.__();
System.out.println("done");
}
}
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/separate2/Basic.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
public class Basic {
public static void main(String []argv) {
// new _();
// new __();
System.out.println("done");
}
}

aspect XX {
public static class Basic._ {
public static class Basic.__ {
}
}
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/separate2/Basic2.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public class Basic2 {
public static void main(String []argv) {
new Basic._();
new Basic.__();
System.out.println("done");
}
}
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/seven/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/seven/Underscorer.aj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package a.b.c;

public aspect Underscorer {
public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public Ip ip = new Ip();
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
public class Ip {
public String fieldName() { return "ip"; }
Expand Down
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/seven/Vote.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Vote {

public static Vote._ _() { return new Vote._(null); }
public static Vote.__ __() { return new Vote.__(null); }

static class RealInner {}

Expand Down
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/six/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.choice.class)
@RelatedType(value=Vote.__.choice.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/six/Vote.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Vote {

public static Vote._ field = new Vote._(null);
public static Vote.__ field = new Vote.__(null);

static class RealInner {}

Expand Down
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/six/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package a.b.c;

public aspect Vote_Amender {
public static class Vote._ {
public static class Vote.__ {
private String string;
public static class choice {}
public Ip ip = new Ip();
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
public class Ip {
public String fieldName() { return "ip"; }
Expand Down
6 changes: 3 additions & 3 deletions tests/features169/itdInnerTypes/ten/Aspect1.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
aspect Aspect1 {
public static class Construction._ {
public static class Construction.__ {
private String string;
public _(String string) { this.string = string; }
public _() { this.string = "nothing"; }
public __(String string) { this.string = string; }
public __() { this.string = "nothing"; }
public String toString() {
return string;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/ten/Aspect2.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aspect Aspect2 {
public Construction._ Construction._() { return new _("abc"); }
public Construction.__ Construction.__() { return new __("abc"); }
}
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/ten/Construction.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public class Construction {
public static void main(String []argv) {
new _();
System.out.println(new _("abcde"));
new __();
System.out.println(new __("abcde"));
}
}
5 changes: 2 additions & 3 deletions tests/features169/itdInnerTypes/three/Runner.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package a.b.c;

@RelatedType(value=Vote._.class)
@RelatedType(value=Vote.__.class)
public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
System.out.println(Runner.class.getDeclaredAnnotations()[0]);
}
}

4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/three/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package a.b.c;

public aspect Vote_Amender {
public static class Vote._ {
public static class Vote.__ {
private String string;
private String choice = "abc";
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
}
}
2 changes: 1 addition & 1 deletion tests/features169/itdInnerTypes/two/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Runner {
public static void main(String[]argv) {
Vote._ v = new Vote._("wibble");
Vote.__ v = new Vote.__("wibble");
System.out.println(v.getString());
}
}
4 changes: 2 additions & 2 deletions tests/features169/itdInnerTypes/two/Vote_Amender.aj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package a.b.c;

public aspect Vote_Amender {
public static class Vote._ {
public static class Vote.__ {
private String string;
public _(String string) { this.string = string; }
public __(String string) { this.string = string; }
public String getString() { return this.string; }
}
}
Loading

0 comments on commit 3e82099

Please sign in to comment.