View | Details | Raw Unified | Return to bug 161554
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-13 / +6 lines)
Lines 33-39 Link Here
33
	// All specified tests which does not belong to the class are skipped...
33
	// All specified tests which does not belong to the class are skipped...
34
	static {
34
	static {
35
//		TESTS_NAMES = new String[] { "test0788" };
35
//		TESTS_NAMES = new String[] { "test0788" };
36
//		TESTS_NUMBERS = new int[] { 1050, 1054 };
36
//		TESTS_NUMBERS = new int[] { 1050 };
37
//		TESTS_RANGE = new int[] { 821, -1 };
37
//		TESTS_RANGE = new int[] { 821, -1 };
38
	}
38
	}
39
	public static Test suite() {
39
	public static Test suite() {
Lines 33744-33759 Link Here
33744
	String expectedOutput =
33744
	String expectedOutput =
33745
		"xxx\n" + 
33745
		"xxx\n" + 
33746
    	"true\n" + 
33746
    	"true\n" + 
33747
    	"Exception: java.lang.ClassCastException: [Ljava.lang.Object;\n" + 
33747
    	"ClassCastException: Object[] cannot be cast to String[]\n" + 
33748
    	"Exception: java.lang.ClassCastException: [Ljava.lang.Object;";
33748
    	"ClassCastException: Object[] cannot be cast to String[]";
33749
	
33749
33750
	if (isJRELevel(AbstractCompilerTest.F_1_6)) {
33751
		expectedOutput =
33752
			"xxx\n" + 
33753
			"true\n" + 
33754
			"Exception: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;\n" + 
33755
			"Exception: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;";
33756
	}
33757
	this.runConformTest(
33750
	this.runConformTest(
33758
		new String[] {
33751
		new String[] {
33759
			"X.java", //========================
33752
			"X.java", //========================
Lines 33784-33795 Link Here
33784
			"    try {\n" + 
33777
			"    try {\n" + 
33785
			"      System.out.println(data[0]);\n" + 
33778
			"      System.out.println(data[0]);\n" + 
33786
			"    } catch (ClassCastException e) {\n" + 
33779
			"    } catch (ClassCastException e) {\n" + 
33787
			"      System.out.println(\"Exception: \" + e);\n" + 
33780
			"      System.out.println(\"ClassCastException: Object[] cannot be cast to String[]\");\n" + 
33788
			"    }\n" + 
33781
			"    }\n" + 
33789
			"    try {\n" + 
33782
			"    try {\n" + 
33790
			"      System.out.println(data()[0]);\n" + 
33783
			"      System.out.println(data()[0]);\n" + 
33791
			"    } catch (ClassCastException e) {\n" + 
33784
			"    } catch (ClassCastException e) {\n" + 
33792
			"      System.out.println(\"Exception: \" + e);\n" + 
33785
			"      System.out.println(\"ClassCastException: Object[] cannot be cast to String[]\");\n" + 
33793
			"    }\n" + 
33786
			"    }\n" + 
33794
			"  }\n" + 
33787
			"  }\n" + 
33795
			"}\n" + 
33788
			"}\n" + 

Return to bug 161554