[java] More tests for preview; minor fixes

GitOrigin-RevId: 7f72c5f68ab821e728eb0d5152f0910f48035046
This commit is contained in:
Tagir Valeev
2022-07-20 15:22:33 +02:00
committed by intellij-monorepo-bot
parent 7a1f179f41
commit 9c6aeba5b4
726 changed files with 874 additions and 767 deletions

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Thread'" "true"
// "Add on-demand static import for 'java.lang.Thread'" "true-preview"
package test;
import static java.lang.Thread.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
import java.util.*;
import static java.util.Arrays.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Bar'" "true"
// "Add on-demand static import for 'test.Bar'" "true-preview"
package test;
import static test.Bar.*;
@@ -10,7 +10,7 @@ class Bar {
public class Foo {
{
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
static class D {
@@ -18,19 +18,19 @@ public class Foo {
}
{
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
}
{
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
{
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
{
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
}

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.annotation.ElementType'" "true"
// "Add on-demand static import for 'java.lang.annotation.ElementType'" "true-preview"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Test.Letter'" "true"
// "Add on-demand static import for 'test.Test.Letter'" "true-preview"
package test;
import static test.Test.Letter.*;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.StaticImport.v'" "true"
// "Add static import for 'test.StaticImport.v'" "true-preview"
package test;
import static test.StaticImport.v;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'pkg.F'" "true"
// "Add on-demand static import for 'pkg.F'" "true-preview"
package pkg;
class F {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Math'" "true"
// "Add on-demand static import for 'java.lang.Math'" "true-preview"
package test;
import static java.lang.Math.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Math'" "true"
// "Add on-demand static import for 'java.lang.Math'" "true-preview"
package test;
import static java.lang.Math.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Map'" "true"
// "Add on-demand static import for 'java.util.Map'" "true-preview"
import java.util.List;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
package test;
import java.util.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Bar'" "true"
// "Add on-demand static import for 'test.Bar'" "true-preview"
package test;
import static test.Bar.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
import java.util.Arrays;
import static java.util.Arrays.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Foo'" "true"
// "Add on-demand static import for 'test.Foo'" "true-preview"
package test;
import java.util.List;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Foo'" "true"
// "Add on-demand static import for 'test.Foo'" "true-preview"
package test;
class Foo {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.GregorianCalendar'" "true"
// "Add on-demand static import for 'test.GregorianCalendar'" "true-preview"
package test;
import static test.GregorianCalendar.*;

View File

@@ -1,4 +1,4 @@
// "Add import for 'test.Bar.Foo'" "true"
// "Add import for 'test.Bar.Foo'" "true-preview"
package test;
import test.Bar.Foo;

View File

@@ -1,4 +1,4 @@
// "Add import for 'test.Bar.Foo'" "true"
// "Add import for 'test.Bar.Foo'" "true-preview"
package test;
import test.Bar.Foo;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Bar.f'" "true"
// "Add static import for 'test.Bar.f'" "true-preview"
package test;
import static test.Bar.*;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Bar.f'" "true"
// "Add static import for 'test.Bar.f'" "true-preview"
package test;
import static test.Bar.f;

View File

@@ -1,4 +1,4 @@
// "Use static import for 'java.lang.Math.abs'" "true"
// "Use static import for 'java.lang.Math.abs'" "true-preview"
package test;
import static java.lang.Math.abs;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'java.lang.Math.abs'" "true"
// "Add static import for 'java.lang.Math.abs'" "true-preview"
package test;
import static java.lang.Math.abs;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Calendar.getInstance'" "true"
// "Add static import for 'test.Calendar.getInstance'" "true-preview"
package test;
import static test.Calendar.getInstance;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Test.Letter'" "true"
// "Add on-demand static import for 'test.Test.Letter'" "true-preview"
package test;
import static test.Test.Letter.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Thread'" "true"
// "Add on-demand static import for 'java.lang.Thread'" "true-preview"
package test;
public class Foo {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
import java.util.*;
class Foo {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Bar'" "true"
// "Add on-demand static import for 'test.Bar'" "true-preview"
package test;
class Bar {
@@ -8,7 +8,7 @@ class Bar {
public class Foo {
{
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
static class D {
@@ -16,19 +16,19 @@ public class Foo {
}
{
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
}
{
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
{
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
{
<caret>Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
<caret>Bar.f(); // invoke 'add on-demand static import' for Bar class here. The call is now done to other method.
}
}

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.annotation.ElementType'" "true"
// "Add on-demand static import for 'java.lang.annotation.ElementType'" "true-preview"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Test.Letter'" "true"
// "Add on-demand static import for 'test.Test.Letter'" "true-preview"
package test;
class Test {

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.StaticImport.v'" "true"
// "Add static import for 'test.StaticImport.v'" "true-preview"
package test;
class StaticImport {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'pkg.F'" "true"
// "Add on-demand static import for 'pkg.F'" "true-preview"
package pkg;
class F {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Math'" "true"
// "Add on-demand static import for 'java.lang.Math'" "true-preview"
package test;
import static java.lang.Math.abs;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.lang.Math'" "true"
// "Add on-demand static import for 'java.lang.Math'" "true-preview"
package test;
import static java.lang.Math.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Map'" "true"
// "Add on-demand static import for 'java.util.Map'" "true-preview"
import java.util.List;
import java.util.Map;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
package test;
import java.util.*;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Bar'" "true"
// "Add on-demand static import for 'test.Bar'" "true-preview"
package test;
class Bar {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'java.util.Arrays'" "true"
// "Add on-demand static import for 'java.util.Arrays'" "true-preview"
import java.util.Arrays;
public class MyFile {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Foo'" "true"
// "Add on-demand static import for 'test.Foo'" "true-preview"
package test;
import java.util.List;

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Foo'" "true"
// "Add on-demand static import for 'test.Foo'" "true-preview"
package test;
class Foo {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.GregorianCalendar'" "true"
// "Add on-demand static import for 'test.GregorianCalendar'" "true-preview"
package test;
public class Foo {

View File

@@ -1,4 +1,4 @@
// "Add import for 'test.Bar.Foo'" "true"
// "Add import for 'test.Bar.Foo'" "true-preview"
package test;
class Bar {

View File

@@ -1,4 +1,4 @@
// "Add import for 'test.Bar.Foo'" "true"
// "Add import for 'test.Bar.Foo'" "true-preview"
package test;
class Bar {

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Bar.f'" "true"
// "Add static import for 'test.Bar.f'" "true-preview"
package test;
import static test.Bar.*;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Bar.f'" "true"
// "Add static import for 'test.Bar.f'" "true-preview"
package test;
import static test.Bar1.f;

View File

@@ -1,4 +1,4 @@
// "Use static import for 'java.lang.Math.abs'" "true"
// "Use static import for 'java.lang.Math.abs'" "true-preview"
package test;
import static java.lang.Math.abs;

View File

@@ -1,4 +1,4 @@
// "Add static import for 'java.lang.Math.abs'" "true"
// "Add static import for 'java.lang.Math.abs'" "true-preview"
package test;
class X {{

View File

@@ -1,4 +1,4 @@
// "Add static import for 'test.Calendar.getInstance'" "true"
// "Add static import for 'test.Calendar.getInstance'" "true-preview"
package test;
public class Foo {

View File

@@ -1,4 +1,4 @@
// "Add on-demand static import for 'test.Test.Letter'" "true"
// "Add on-demand static import for 'test.Test.Letter'" "true-preview"
package test;
class Test {