mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
[java-intentions] More preview tests; minor fixes
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e74564a52c
commit
7e1064ea3c
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
<caret>return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
<caret>return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
int i = 0<caret>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
int i = 2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'if' statement" "true"
|
||||
// "Remove 'if' statement" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
int i = 2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
// "Unwrap 'if' statement" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
//sdf
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f(boolean b) {
|
||||
if (!b) return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
|
||||
void test(int a, int b) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
package test;
|
||||
|
||||
public class TestSimplifyIf
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
void foo(int x) {
|
||||
boolean a = x <= 5;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
if (false || <caret>true || this == null) return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
int i = 2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'if' statement" "true"
|
||||
// "Remove 'if' statement" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
int i = 2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
// "Unwrap 'if' statement" "true-preview"
|
||||
class X {
|
||||
void f() {
|
||||
if ((!(!((boolean)true))<caret> ==(true))) {
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
void f(boolean b) {
|
||||
if (<caret>b == false) return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class X {
|
||||
|
||||
void test(int a, int b) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
package test;
|
||||
|
||||
public class TestSimplifyIf
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Simplify boolean expression" "true"
|
||||
// "Simplify boolean expression" "true-preview"
|
||||
class A {
|
||||
boolean a = true;
|
||||
boolean b = true;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user