mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
fix syntax errors in test files to make sure we are testing the correct thing
GitOrigin-RevId: 09bf5fde01489c9edbc233e586fe7137f7e3fe9b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6f8350fd7a
commit
67f7db108e
@@ -2,7 +2,7 @@
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
{
|
||||
synchronized(vb){ }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
var l = ((new OpenValueBased() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
|
||||
void f{
|
||||
void f(){
|
||||
synchronized(vb){ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for statement" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
var l = ((new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for statement" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
void f(){
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
void f(){
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
@SuppressWarnings("synchronization")
|
||||
void f(){
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){
|
||||
@Override
|
||||
public void g() {
|
||||
}
|
||||
};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
@SuppressWarnings("synchronization")
|
||||
@Override
|
||||
void g() {
|
||||
public void g() {
|
||||
synchronized (vb){ }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for class" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
{
|
||||
synchronized(<caret>vb){ }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for class" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for class" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
var l = ((new OpenValueBased() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
|
||||
void f{
|
||||
void f(){
|
||||
synchronized(<caret>vb){ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for statement" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
var l = ((new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for statement" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
synchronized(<caret>vb){ }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){};
|
||||
|
||||
void f(){
|
||||
var l = ((new OpenValueBased() {
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
// "Suppress for method" "true"
|
||||
|
||||
class Main {
|
||||
final OpenValueBased vb = new OpenValueBased();
|
||||
final OpenValueBased vb = new OpenValueBased(){
|
||||
@Override
|
||||
public void g() {
|
||||
}
|
||||
};
|
||||
|
||||
void f(){
|
||||
new OpenValueBased() {
|
||||
@Override
|
||||
void g() {
|
||||
public void g() {
|
||||
synchronized (<caret>vb){ }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,10 +4,23 @@ package com.intellij.java.codeInsight.daemon.valuebased;
|
||||
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.valuebased.SynchronizeOnValueBasedClassInspection;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import org.intellij.lang.annotations.Language;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class SynchronizeOnValueBasedClassFixTest extends LightQuickFixParameterizedTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
@Language("JAVA")
|
||||
String valueBased = """
|
||||
package jdk.internal;
|
||||
public @interface ValueBased {
|
||||
}
|
||||
""";
|
||||
createAndSaveFile("jdk/internal/ValueBased.java", valueBased);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NonNls String getBasePath() {
|
||||
@@ -19,4 +32,8 @@ public class SynchronizeOnValueBasedClassFixTest extends LightQuickFixParameteri
|
||||
return new LocalInspectionTool[]{ new SynchronizeOnValueBasedClassInspection() };
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeActionStarted(String testName, String contents) {
|
||||
assertEmpty(doHighlighting(HighlightSeverity.ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user