more java tests moved to community

This commit is contained in:
Alexey Kudravtsev
2010-06-25 10:48:17 +04:00
parent 735a9d17a8
commit 2718da9fc7
1139 changed files with 14287 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// "Create Method 'get'" "true"
class W<T> {
public T get(T s) {
<selection>return null; //To change body of created methods use File | Settings | File Templates.</selection>
}
}
class C {
void foo () {
W<String> w = new W<String>();
String s = w.get("");
}
}

View File

@@ -0,0 +1,12 @@
// "Create Method 'get'" "true"
class Generic<T> {
public T get() {
<selection>return null; //To change body of created methods use File | Settings | File Templates.<caret></selection>
}
}
class WWW {
<E> void foo (Generic<E> p) {
E e = p.get();
}
}

View File

@@ -0,0 +1,16 @@
// "Create Method 'foo'" "true"
interface Int<T> {
}
class A1<T> implements Int<T> {
public void foo(Int<T> c) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection><caret>
}
}
class B1 {
A1<String> a;
void foo (Int<String> c) {
a.foo(c);
}
}

View File

@@ -0,0 +1,20 @@
// "Create Method 'foo'" "true"
interface Comparable<T> {
}
class R implements Comparable<R> {
}
class A1<T> {
public T foo() {
<selection>return null; //To change body of created methods use File | Settings | File Templates.<caret></selection>
}
}
class B1 {
A1<R> a;
void foo (Comparable<R> c) {
c = a.foo();
}
}

View File

@@ -0,0 +1,16 @@
// "Create Constructor" "true"
public class Seq<T> {
public Seq() {}
public Seq(T x, Seq<T> xs) {
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
}
static <T> Seq<T> nil () {
return new Seq<T> ();
}
static <V> Seq<V> cons (V x, Seq<V> xs) {
return new Seq<V> (x, xs);
}
}

View File

@@ -0,0 +1,10 @@
// "Create Method 'get'" "true"
class W<T> {
}
class C {
void foo () {
W<String> w = new W<String>();
String s = w.<caret>get("");
}
}

View File

@@ -0,0 +1,9 @@
// "Create Method 'get'" "true"
class Generic<T> {
}
class WWW {
<E> void foo (Generic<E> p) {
E e = p.g<caret>et();
}
}

View File

@@ -0,0 +1,13 @@
// "Create Method 'foo'" "true"
interface Int<T> {
}
class A1<T> implements Int<T> {
}
class B1 {
A1<String> a;
void foo (Int<String> c) {
a.<caret>foo(c);
}
}

View File

@@ -0,0 +1,17 @@
// "Create Method 'foo'" "true"
interface Comparable<T> {
}
class R implements Comparable<R> {
}
class A1<T> {
}
class B1 {
A1<R> a;
void foo (Comparable<R> c) {
c = a.<caret>foo();
}
}

View File

@@ -0,0 +1,12 @@
// "Create Constructor" "true"
public class Seq<T> {
public Seq() {}
static <T> Seq<T> nil () {
return new Seq<T> ();
}
static <V> Seq<V> cons (V x, Seq<V> xs) {
return new Seq<V> (x, xs)<caret>;
}
}