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

(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-2 / +23 lines)
Lines 37-43 Link Here
37
	// All specified tests which does not belong to the class are skipped...
37
	// All specified tests which does not belong to the class are skipped...
38
	static {
38
	static {
39
//		TESTS_NAMES = new String[] { "test127" };
39
//		TESTS_NAMES = new String[] { "test127" };
40
//		TESTS_NUMBERS = new int[] { 143 };
40
//		TESTS_NUMBERS = new int[] { 148 };
41
//		TESTS_RANGE = new int[] { 21, 50 };
41
//		TESTS_RANGE = new int[] { 21, 50 };
42
	}
42
	}
43
	public static Test suite() {
43
	public static Test suite() {
Lines 4588-4594 Link Here
4588
			"	           ^^^\n" + 
4588
			"	           ^^^\n" + 
4589
			"Cannot reference a field before it is defined\n" + 
4589
			"Cannot reference a field before it is defined\n" + 
4590
			"----------\n");
4590
			"----------\n");
4591
    }      
4591
    }
4592
    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=96631
4592
    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=96631
4593
    public void test146() {
4593
    public void test146() {
4594
        this.runConformTest(
4594
        this.runConformTest(
Lines 4619-4622 Link Here
4619
			options
4619
			options
4620
		);
4620
		);
4621
    }
4621
    }
4622
    
4623
    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=97466
4624
    public void test148() {
4625
        this.runNegativeTest(
4626
            new String[] {
4627
                "X.java",
4628
				"public class X {\n" +
4629
				"	private static void foo() {\n" +
4630
				"		 @interface Bar {\n" +
4631
				"			public String bar = \"BUG\";\n" +
4632
				"		}\n" +
4633
				"	}\n" +
4634
				"}",
4635
            },
4636
            "----------\n" + 
4637
    		"1. ERROR in X.java (at line 3)\n" + 
4638
    		"	@interface Bar {\n" + 
4639
    		"	           ^^^\n" + 
4640
    		"The member annotation Bar can only be defined inside a top-level class or interface\n" + 
4641
    		"----------\n");
4642
    }
4622
}
4643
}

Return to bug 97459