mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
more java tests moved to community
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection c = new MyCollection(1, "test");
|
||||
}
|
||||
}
|
||||
|
||||
public class MyCollection implements Collection {
|
||||
public MyCollection(int i, String s) {<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Create Class 'MyArrayList'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
ArrayList list = new MyArrayList(1, "test");
|
||||
}
|
||||
}
|
||||
|
||||
public class MyArrayList extends ArrayList {
|
||||
public MyArrayList(int i, String s) {<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create Class 'MyInteger'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
int xxx = 3;
|
||||
Integer i = new MyInteger(xxx);
|
||||
}
|
||||
}
|
||||
|
||||
public class MyInteger {
|
||||
public MyInteger(int xxx) {<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection[] cc = new MyCollection[10];
|
||||
}
|
||||
}<caret>
|
||||
|
||||
public class MyCollection {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection c = new Test.MyCollection(1);
|
||||
}
|
||||
|
||||
public class MyCollection implements Collection {
|
||||
public MyCollection(int i) {<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create Class 'MyTableModel'" "true"
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
JTable table = new JTable(new MyTableModel());
|
||||
}
|
||||
}<caret>
|
||||
|
||||
public class MyTableModel implements TableModel {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create Class 'Generic'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new Generic<String> ();
|
||||
}
|
||||
}<caret>
|
||||
|
||||
public class Generic<T> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection c = new <caret>MyCollection(1, "test");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create Class 'MyArrayList'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
ArrayList list = new <caret>MyArrayList(1, "test");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create Class 'MyInteger'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
int xxx = 3;
|
||||
Integer i = new <caret>MyInteger(xxx);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Do not try to create class Inner" "false"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
new Te<caret>st.Inner();
|
||||
}
|
||||
|
||||
public static class Inner {}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Do not try to create class Inner" "false"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
new Inner<caret>();
|
||||
}
|
||||
|
||||
public static class Inner {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection[] cc = new <caret>MyCollection[10];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create Class 'MyCollection'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
Collection c = new Test.My<caret>Collection(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create Class 'MyTableModel'" "true"
|
||||
import javax.swing.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
JTable table = new JTable(new MyTable<caret>Model());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Do not create anything" "false"
|
||||
import javax.swing.*;
|
||||
|
||||
public class Test {
|
||||
public static void main() {
|
||||
boolean[] bees = new boolean[args.leng<caret>th];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create Class 'Generic'" "true"
|
||||
class Test {
|
||||
void foo () {
|
||||
new <caret>Generic<String> ();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user