aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc161/OptimizedAnnotationFieldBinding.java
blob: b1b93d1e599097d84e75389fbeebd1702635229c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* *******************************************************************
 * Copyright (c) 2008 Contributors
 * All rights reserved.
 * This program and the accompanying materials are made available
 * under the terms of the Eclipse Public License v 2.0
 * which accompanies this distribution and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
 *
 *  Contributors
 *  Andy Clement
 * ******************************************************************/
package org.aspectj.systemtest.ajc161;

import org.aspectj.testing.XMLBasedAjcTestCase;

import junit.framework.Test;

/**
 * Optimising Annotation Field Binding - better code gen for the cases where the user just wants a field from the
 * annotation on a method but not the whole annotation.
 *
 */
public class OptimizedAnnotationFieldBinding extends XMLBasedAjcTestCase {

    public void testCaseOne_Syntax() {
        runTest("case one - syntax");
    }
    public void testCaseTwo_NoSuchField() {
        runTest("case two - no such field");
    }
    public void testCaseThree_Ambiguous() {
        runTest("case three - ambiguous");
    }
    public void testCaseFour_DefaultValue() {
        runTest("case four - default value");
    }
    public void testCaseFive_NotAnEnum_CompilerLimitation() {
        runTest("case five - not an enum - compiler limitation");
    }
    public void testCaseSeven_AnnosInPackagesOne() {
        runTest("case seven - annos in packages one");
    }
    public void testCaseEight_AnnosInPackagesTwo() {
        runTest("case eight - annos in packages two");
    }
    public void testCaseNine_AllInDifferentPackages() {
        runTest("case nine - everything in different packages");
    }
    public void testCaseTen_BindingMultipleThings() {
        runTest("case ten - binding multiple things");
    }
    public void testCaseEleven_BindingMultipleAnnotationFields() {
        runTest("case eleven - binding multiple annotation fields");
    }
    public void testCaseTwelve_BindingAnnoAndAnnoValue() {
        runTest("case twelve - binding anno and anno value");
    }
    public void testCaseThirteen_bugNPE() {
        runTest("case thirteen - bug npe");
    }

	/////////////////////////////////////////
	public static Test suite() {
	    return XMLBasedAjcTestCase.loadSuite(OptimizedAnnotationFieldBinding.class);
	}

	protected java.net.URL getSpecFile() {
	    return getClassResource("annotationFieldBinding.xml");
	}
}