From 5cdb0757d39d100c76bbca63734fb83b4cb13753 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 27 Oct 2013 22:32:44 +0100 Subject: [issue 598] JDK8 update broke assignment-with-operator in delombok. --- .../resource/after-delombok/TestOperators.java | 48 ++++++++++++++++++++ .../resource/after-ecj/TestOperators.java | 51 ++++++++++++++++++++++ test/transform/resource/before/TestOperators.java | 48 ++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 test/transform/resource/after-delombok/TestOperators.java create mode 100644 test/transform/resource/after-ecj/TestOperators.java create mode 100644 test/transform/resource/before/TestOperators.java (limited to 'test') diff --git a/test/transform/resource/after-delombok/TestOperators.java b/test/transform/resource/after-delombok/TestOperators.java new file mode 100644 index 00000000..566bedfc --- /dev/null +++ b/test/transform/resource/after-delombok/TestOperators.java @@ -0,0 +1,48 @@ +class TestOperators { + int x = 10; + public void test() { + x = 12; + int a = +x; + boolean d = true; + boolean e = false; + boolean b; + a = -x; + b = !d; + a = ~x; + a = ++x; + a = --x; + a = x++; + a = x--; + b = d || e; + b = d && e; + a = x | a; + a = x ^ a; + a = x & a; + b = a == x; + b = a != x; + b = a < x; + b = a > x; + b = a <= x; + b = a >= x; + a = a << x; + a = a >> x; + a = a >>> x; + a = a + x; + a = a - x; + a = a * x; + a = a / x; + a = a % x; + a |= x; + a ^= x; + a &= x; + a <<= x; + a >>= x; + a >>>= x; + a += x; + a -= x; + a *= x; + a /= x; + a %= x; + a = a > x ? 1 : 0; + } +} diff --git a/test/transform/resource/after-ecj/TestOperators.java b/test/transform/resource/after-ecj/TestOperators.java new file mode 100644 index 00000000..8a78ceeb --- /dev/null +++ b/test/transform/resource/after-ecj/TestOperators.java @@ -0,0 +1,51 @@ +class TestOperators { + int x = 10; + TestOperators() { + super(); + } + public void test() { + x = 12; + int a = (+ x); + boolean d = true; + boolean e = false; + boolean b; + a = (- x); + b = (! d); + a = (~ x); + a = (++ x); + a = (-- x); + a = (x ++); + a = (x --); + b = (d || e); + b = (d && e); + a = (x | a); + a = (x ^ a); + a = (x & a); + b = (a == x); + b = (a != x); + b = (a < x); + b = (a > x); + b = (a <= x); + b = (a >= x); + a = (a << x); + a = (a >> x); + a = (a >>> x); + a = (a + x); + a = (a - x); + a = (a * x); + a = (a / x); + a = (a % x); + a |= x; + a ^= x; + a &= x; + a <<= x; + a >>= x; + a >>>= x; + a += x; + a -= x; + a *= x; + a /= x; + a %= x; + a = ((a > x) ? 1 : 0); + } +} diff --git a/test/transform/resource/before/TestOperators.java b/test/transform/resource/before/TestOperators.java new file mode 100644 index 00000000..566bedfc --- /dev/null +++ b/test/transform/resource/before/TestOperators.java @@ -0,0 +1,48 @@ +class TestOperators { + int x = 10; + public void test() { + x = 12; + int a = +x; + boolean d = true; + boolean e = false; + boolean b; + a = -x; + b = !d; + a = ~x; + a = ++x; + a = --x; + a = x++; + a = x--; + b = d || e; + b = d && e; + a = x | a; + a = x ^ a; + a = x & a; + b = a == x; + b = a != x; + b = a < x; + b = a > x; + b = a <= x; + b = a >= x; + a = a << x; + a = a >> x; + a = a >>> x; + a = a + x; + a = a - x; + a = a * x; + a = a / x; + a = a % x; + a |= x; + a ^= x; + a &= x; + a <<= x; + a >>= x; + a >>>= x; + a += x; + a -= x; + a *= x; + a /= x; + a %= x; + a = a > x ? 1 : 0; + } +} -- cgit