diff options
Diffstat (limited to 'plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif')
5 files changed, 29 insertions, 1 deletions
diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed.java new file mode 100644 index 000000000000..08624319e916 --- /dev/null +++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed.java @@ -0,0 +1,6 @@ +public class Test { + boolean A, B, C; + boolean f() { + return A &<caret>& B || C; + } +} diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed_after.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed_after.java new file mode 100644 index 000000000000..674db9265a09 --- /dev/null +++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/AndOrMixed_after.java @@ -0,0 +1,8 @@ +public class Test { + boolean A, B, C; + boolean f() { + if (A) if (B) return true; + if (C) return true; + return false; + } +} diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/Nested_after.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/Nested_after.java index 2fec2c096d6d..82c3763205e1 100644 --- a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/Nested_after.java +++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/Nested_after.java @@ -3,7 +3,7 @@ package com.siyeh.ipp.trivialif.convert_to_nested_if; class Nested { boolean foo(boolean a, boolean b, boolean c) { if (a) return true; - else if (b ^ c) if (a) return true; + if (b ^ c) if (a) return true; return false; } }
\ No newline at end of file diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed.java new file mode 100644 index 000000000000..72cbc88c75c5 --- /dev/null +++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed.java @@ -0,0 +1,6 @@ +public class Test { + boolean A, B, C; + boolean f() { + return C || A &<caret>& B; + } +} diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed_after.java b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed_after.java new file mode 100644 index 000000000000..e2b75a2fc639 --- /dev/null +++ b/plugins/IntentionPowerPak/test/com/siyeh/ipp/trivialif/convert_to_nested_if/OrAndMixed_after.java @@ -0,0 +1,8 @@ +public class Test { + boolean A, B, C; + boolean f() { + if (C) return true; + if (A) if (B) return true; + return false; + } +} |