summaryrefslogtreecommitdiff
path: root/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-18 11:43:07 -0700
committerTor Norbye <tnorbye@google.com>2014-09-18 11:43:28 -0700
commite782c57d74000722f9db4c9426317410520670c6 (patch)
tree6e5d3e8934107ffabb7661f8bfc0e1a08eb37faf /plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals
parentc3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff)
downloadidea-e782c57d74000722f9db4c9426317410520670c6.tar.gz
Snapshot idea/138.2210 from git://git.jetbrains.org/idea/community.git
Change-Id: I8f0204d7887ee78cf1fd8c09f936c5afff0edd2f
Diffstat (limited to 'plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals')
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/EnumComparison.java8
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison.java6
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison_after.java6
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NullComparison.java6
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/PrimitiveComparison.java6
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison.java6
-rw-r--r--plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison_after.java6
7 files changed, 44 insertions, 0 deletions
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/EnumComparison.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/EnumComparison.java
new file mode 100644
index 000000000000..bf1f08c198c5
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/EnumComparison.java
@@ -0,0 +1,8 @@
+public class EnumComparison {
+
+ enum E { A, B }
+
+ boolean a(E a, E b) {
+ return a ==<caret> b;
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison.java
new file mode 100644
index 000000000000..863fa48d0c78
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison.java
@@ -0,0 +1,6 @@
+public class NegatedObjectComparison {
+
+ boolean a(Object a, Object b) {
+ return a !=<caret> b;
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison_after.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison_after.java
new file mode 100644
index 000000000000..72eda7377647
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NegatedObjectComparison_after.java
@@ -0,0 +1,6 @@
+public class NegatedObjectComparison {
+
+ boolean a(Object a, Object b) {
+ return !a.equals(b);
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NullComparison.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NullComparison.java
new file mode 100644
index 000000000000..559ec3aec144
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/NullComparison.java
@@ -0,0 +1,6 @@
+public class NullComparison {
+
+ boolean a(Object a) {
+ return a ==<caret> null;
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/PrimitiveComparison.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/PrimitiveComparison.java
new file mode 100644
index 000000000000..0f25977323ab
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/PrimitiveComparison.java
@@ -0,0 +1,6 @@
+public class PrimitiveComparison {
+
+ boolean a(int i, int j) {
+ return i <caret>== j;
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison.java
new file mode 100644
index 000000000000..baccea789e04
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison.java
@@ -0,0 +1,6 @@
+public class SimpleObjectComparison {
+
+ boolean a(Object a, Object b) {
+ return a == b<caret>;
+ }
+} \ No newline at end of file
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison_after.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison_after.java
new file mode 100644
index 000000000000..ab1bcce4c87b
--- /dev/null
+++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/equality/replace_equality_with_equals/SimpleObjectComparison_after.java
@@ -0,0 +1,6 @@
+public class SimpleObjectComparison {
+
+ boolean a(Object a, Object b) {
+ return a.equals(b);
+ }
+} \ No newline at end of file