diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-01-17 23:57:11 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-01-17 23:57:11 +0100 |
commit | 41a85d2814a979cb2c1c31b5a95dd96cd8a23f87 (patch) | |
tree | f41a0c45d4c1f23b76294c00cd9748a717d3f98c /test | |
parent | 47037e2830057143d1597b8d6b6725143ea09f0d (diff) | |
download | lombok-41a85d2814a979cb2c1c31b5a95dd96cd8a23f87.tar.gz lombok-41a85d2814a979cb2c1c31b5a95dd96cd8a23f87.tar.bz2 lombok-41a85d2814a979cb2c1c31b5a95dd96cd8a23f87.zip |
Some of the tests weren't succeeding (and haven't for a while now) since fixing the bug where lombok will call equals(SomeSpecificType) instead of equals(Object) from data. This commit rectifies this by updating the tests.
Diffstat (limited to 'test')
15 files changed, 42 insertions, 43 deletions
diff --git a/test/transform/resource/after-delombok/DataExtended.java b/test/transform/resource/after-delombok/DataExtended.java index be1c3b74..d580b885 100644 --- a/test/transform/resource/after-delombok/DataExtended.java +++ b/test/transform/resource/after-delombok/DataExtended.java @@ -17,7 +17,7 @@ class DataExtended { if (o == this) return true; if (!(o instanceof DataExtended)) return false; final DataExtended other = (DataExtended)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; return true; } diff --git a/test/transform/resource/after-delombok/DataIgnore.java b/test/transform/resource/after-delombok/DataIgnore.java index 9f2a7d79..b74b6a8f 100644 --- a/test/transform/resource/after-delombok/DataIgnore.java +++ b/test/transform/resource/after-delombok/DataIgnore.java @@ -16,7 +16,7 @@ class DataIgnore { if (o == this) return true; if (!(o instanceof DataIgnore)) return false; final DataIgnore other = (DataIgnore)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; return true; } diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java index 02101a81..ad174b93 100644 --- a/test/transform/resource/after-delombok/DataOnLocalClass.java +++ b/test/transform/resource/after-delombok/DataOnLocalClass.java @@ -25,9 +25,9 @@ class DataOnLocalClass1 { if (o == this) return true; if (!(o instanceof Local)) return false; final Local other = (Local)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; - if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; + if (this.getName() == null ? other.getName() != null : !this.getName().equals((java.lang.Object)other.getName())) return false; return true; } @java.lang.SuppressWarnings("all") @@ -79,8 +79,8 @@ class DataOnLocalClass2 { if (o == this) return true; if (!(o instanceof InnerLocal)) return false; final InnerLocal other = (InnerLocal)o; - if (!other.canEqual(this)) return false; - if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; + if (!other.canEqual((java.lang.Object)this)) return false; + if (this.getName() == null ? other.getName() != null : !this.getName().equals((java.lang.Object)other.getName())) return false; return true; } @java.lang.SuppressWarnings("all") @@ -115,7 +115,7 @@ class DataOnLocalClass2 { if (o == this) return true; if (!(o instanceof Local)) return false; final Local other = (Local)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; return true; } diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java index 38e006ed..5124fbeb 100644 --- a/test/transform/resource/after-delombok/DataPlain.java +++ b/test/transform/resource/after-delombok/DataPlain.java @@ -24,9 +24,9 @@ class Data1 { if (o == this) return true; if (!(o instanceof Data1)) return false; final Data1 other = (Data1)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; - if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; + if (this.getName() == null ? other.getName() != null : !this.getName().equals((java.lang.Object)other.getName())) return false; return true; } @java.lang.SuppressWarnings("all") @@ -74,9 +74,9 @@ class Data2 { if (o == this) return true; if (!(o instanceof Data2)) return false; final Data2 other = (Data2)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; - if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; + if (this.getName() == null ? other.getName() != null : !this.getName().equals((java.lang.Object)other.getName())) return false; return true; } @java.lang.SuppressWarnings("all") @@ -125,7 +125,7 @@ final class Data3 { if (!(o instanceof Data3)) return false; final Data3 other = (Data3)o; if (this.getX() != other.getX()) return false; - if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; + if (this.getName() == null ? other.getName() != null : !this.getName().equals((java.lang.Object)other.getName())) return false; return true; } @java.lang.Override @@ -163,7 +163,7 @@ final class Data4 extends java.util.Timer { if (o == this) return true; if (!(o instanceof Data4)) return false; final Data4 other = (Data4)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (!super.equals(o)) return false; if (this.getX() != other.getX()) return false; return true; @@ -192,7 +192,7 @@ class Data5 { if (o == this) return true; if (!(o instanceof Data5)) return false; final Data5 other = (Data5)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; return true; } @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-delombok/DataWithGetter.java b/test/transform/resource/after-delombok/DataWithGetter.java index 1e181370..79df7aa1 100644 --- a/test/transform/resource/after-delombok/DataWithGetter.java +++ b/test/transform/resource/after-delombok/DataWithGetter.java @@ -21,10 +21,10 @@ class DataWithGetter { if (o == this) return true; if (!(o instanceof DataWithGetter)) return false; final DataWithGetter other = (DataWithGetter)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.getX() != other.getX()) return false; if (this.getY() != other.getY()) return false; - if (this.getZ() == null ? other.getZ() != null : !this.getZ().equals(other.getZ())) return false; + if (this.getZ() == null ? other.getZ() != null : !this.getZ().equals((java.lang.Object)other.getZ())) return false; return true; } @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-delombok/DataWithGetterNone.java b/test/transform/resource/after-delombok/DataWithGetterNone.java index b1cab7cf..6b907d37 100644 --- a/test/transform/resource/after-delombok/DataWithGetterNone.java +++ b/test/transform/resource/after-delombok/DataWithGetterNone.java @@ -21,10 +21,10 @@ class DataWithGetterNone { if (o == this) return true; if (!(o instanceof DataWithGetterNone)) return false; final DataWithGetterNone other = (DataWithGetterNone)o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; if (this.x != other.x) return false; if (this.y != other.y) return false; - if (this.z == null ? other.z != null : !this.z.equals(other.z)) return false; + if (this.z == null ? other.z != null : !this.z.equals((java.lang.Object)other.z)) return false; return true; } @java.lang.SuppressWarnings("all") diff --git a/test/transform/resource/after-delombok/GetterLazyEahcToString.java b/test/transform/resource/after-delombok/GetterLazyEahcToString.java index f085722d..74ce716e 100644 --- a/test/transform/resource/after-delombok/GetterLazyEahcToString.java +++ b/test/transform/resource/after-delombok/GetterLazyEahcToString.java @@ -9,9 +9,9 @@ class GetterLazyEahcToString { if (o == this) return true; if (!(o instanceof GetterLazyEahcToString)) return false; final GetterLazyEahcToString other = (GetterLazyEahcToString)o; - if (!other.canEqual(this)) return false; - if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals(other.getValue())) return false; - if (this.value2 == null ? other.value2 != null : !this.value2.equals(other.value2)) return false; + if (!other.canEqual((java.lang.Object)this)) return false; + if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals((java.lang.Object)other.getValue())) return false; + if (this.value2 == null ? other.value2 != null : !this.value2.equals((java.lang.Object)other.value2)) return false; return true; } diff --git a/test/transform/resource/after-ecj/DataExtended.java b/test/transform/resource/after-ecj/DataExtended.java index 10a66547..924fe8da 100644 --- a/test/transform/resource/after-ecj/DataExtended.java +++ b/test/transform/resource/after-ecj/DataExtended.java @@ -15,7 +15,7 @@ if ((! (o instanceof DataExtended))) return false; final DataExtended other = (DataExtended) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; diff --git a/test/transform/resource/after-ecj/DataIgnore.java b/test/transform/resource/after-ecj/DataIgnore.java index 13c8e2f7..fb700ee2 100644 --- a/test/transform/resource/after-ecj/DataIgnore.java +++ b/test/transform/resource/after-ecj/DataIgnore.java @@ -14,7 +14,7 @@ if ((! (o instanceof DataIgnore))) return false; final DataIgnore other = (DataIgnore) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index b987b967..6c85fae7 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -26,11 +26,11 @@ class DataOnLocalClass1 { if ((! (o instanceof Local))) return false; final Local other = (Local) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) return false; return true; } @@ -75,9 +75,9 @@ class DataOnLocalClass2 { if ((! (o instanceof InnerLocal))) return false; final InnerLocal other = (InnerLocal) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) return false; return true; } @@ -108,7 +108,7 @@ class DataOnLocalClass2 { if ((! (o instanceof Local))) return false; final Local other = (Local) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; diff --git a/test/transform/resource/after-ecj/DataPlain.java b/test/transform/resource/after-ecj/DataPlain.java index 4dbac075..0edf164b 100644 --- a/test/transform/resource/after-ecj/DataPlain.java +++ b/test/transform/resource/after-ecj/DataPlain.java @@ -21,11 +21,11 @@ import lombok.Data; if ((! (o instanceof Data1))) return false; final Data1 other = (Data1) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) return false; return true; } @@ -65,11 +65,11 @@ import lombok.Data; if ((! (o instanceof Data2))) return false; final Data2 other = (Data2) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) return false; return true; } @@ -111,7 +111,7 @@ final @Data class Data3 { final Data3 other = (Data3) o; if ((this.getX() != other.getX())) return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) return false; return true; } @@ -140,7 +140,7 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java if ((! (o instanceof Data4))) return false; final Data4 other = (Data4) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((! super.equals(o))) return false; @@ -172,7 +172,7 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java if ((! (o instanceof Data5))) return false; final Data5 other = (Data5) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; return true; } diff --git a/test/transform/resource/after-ecj/DataWithGetter.java b/test/transform/resource/after-ecj/DataWithGetter.java index 904ae0fa..d409382d 100644 --- a/test/transform/resource/after-ecj/DataWithGetter.java +++ b/test/transform/resource/after-ecj/DataWithGetter.java @@ -18,13 +18,13 @@ if ((! (o instanceof DataWithGetter))) return false; final DataWithGetter other = (DataWithGetter) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.getX() != other.getX())) return false; if ((this.getY() != other.getY())) return false; - if (((this.getZ() == null) ? (other.getZ() != null) : (! this.getZ().equals(other.getZ())))) + if (((this.getZ() == null) ? (other.getZ() != null) : (! this.getZ().equals((java.lang.Object) other.getZ())))) return false; return true; } diff --git a/test/transform/resource/after-ecj/DataWithGetterNone.java b/test/transform/resource/after-ecj/DataWithGetterNone.java index 0172f4f3..2380865b 100644 --- a/test/transform/resource/after-ecj/DataWithGetterNone.java +++ b/test/transform/resource/after-ecj/DataWithGetterNone.java @@ -18,13 +18,13 @@ if ((! (o instanceof DataWithGetterNone))) return false; final DataWithGetterNone other = (DataWithGetterNone) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; if ((this.x != other.x)) return false; if ((this.y != other.y)) return false; - if (((this.z == null) ? (other.z != null) : (! this.z.equals(other.z)))) + if (((this.z == null) ? (other.z != null) : (! this.z.equals((java.lang.Object) other.z)))) return false; return true; } diff --git a/test/transform/resource/after-ecj/GetterLazyEahcToString.java b/test/transform/resource/after-ecj/GetterLazyEahcToString.java index 6261ce38..dc732861 100644 --- a/test/transform/resource/after-ecj/GetterLazyEahcToString.java +++ b/test/transform/resource/after-ecj/GetterLazyEahcToString.java @@ -26,11 +26,11 @@ if ((! (o instanceof GetterLazyEahcToString))) return false; final GetterLazyEahcToString other = (GetterLazyEahcToString) o; - if ((! other.canEqual(this))) + if ((! other.canEqual((java.lang.Object) this))) return false; - if (((this.getValue() == null) ? (other.getValue() != null) : (! this.getValue().equals(other.getValue())))) + if (((this.getValue() == null) ? (other.getValue() != null) : (! this.getValue().equals((java.lang.Object) other.getValue())))) return false; - if (((this.value2 == null) ? (other.value2 != null) : (! this.value2.equals(other.value2)))) + if (((this.value2 == null) ? (other.value2 != null) : (! this.value2.equals((java.lang.Object) other.value2)))) return false; return true; } diff --git a/test/transform/resource/messages-idempotent/ValErrors.java.messages b/test/transform/resource/messages-idempotent/ValErrors.java.messages deleted file mode 100644 index ebeee317..00000000 --- a/test/transform/resource/messages-idempotent/ValErrors.java.messages +++ /dev/null @@ -1 +0,0 @@ -6:21 ERROR 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... }) |