[java-intentions] More preview tests; minor fixes

GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
This commit is contained in:
Tagir Valeev
2022-07-28 14:07:20 +02:00
committed by intellij-monorepo-bot
parent e74564a52c
commit 7e1064ea3c
2540 changed files with 2706 additions and 2696 deletions

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
<caret>return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
<caret>return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
int i = 0<caret>;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
int i = 2;

View File

@@ -1,4 +1,4 @@
// "Remove 'if' statement" "true"
// "Remove 'if' statement" "true-preview"
class X {
void f() {
int i = 2;

View File

@@ -1,4 +1,4 @@
// "Unwrap 'if' statement" "true"
// "Unwrap 'if' statement" "true-preview"
class X {
void f() {
//sdf

View File

@@ -1,4 +1,4 @@
// "Unwrap 'if' statement" "true"
// "Unwrap 'if' statement" "true-preview"
class X {
void f(Object pVal, Object n) {
if (!pVal.equals(n))

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f(boolean b) {
if (!b) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f(boolean b, boolean c) {
if (b && c) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void test(int a, int b) {

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
package test;
public class TestSimplifyIf

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
void foo(int x) {
boolean a = x <= 5;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
if (false || <caret>true || this == null) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
if (false || (<caret>true && !(false))|| this == null) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
int i = !(!false && true) || <caret>(true ? true & true : !!false | false) || this == null ? 0 : 1;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f() {
int i = 2;

View File

@@ -1,4 +1,4 @@
// "Remove 'if' statement" "true"
// "Remove 'if' statement" "true-preview"
class X {
void f() {
int i = 2;

View File

@@ -1,4 +1,4 @@
// "Unwrap 'if' statement" "true"
// "Unwrap 'if' statement" "true-preview"
class X {
void f() {
if ((!(!((boolean)true))<caret> ==(true))) {

View File

@@ -1,4 +1,4 @@
// "Unwrap 'if' statement" "true"
// "Unwrap 'if' statement" "true-preview"
class X {
void f(Object pVal, Object n) {
if (!pVal.equals(n))

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f(boolean b) {
if (<caret>b == false) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void f(boolean b, boolean c) {
if (b && tr<caret>ue && c) return;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class X {
void test(int a, int b) {

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
package test;
public class TestSimplifyIf

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
boolean a = true;
boolean b = true;

View File

@@ -1,4 +1,4 @@
// "Simplify boolean expression" "true"
// "Simplify boolean expression" "true-preview"
class A {
void foo(int x) {
boolean a = true<caret> ^ x > 5;