summaryrefslogtreecommitdiffstats
path: root/testing-drivers/testsrc/org/aspectj/testing/drivers/AjcHarnessTestsUsingJUnit.java
blob: ae7de7137afb3842acf2909bd232f0e70e17be3c (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
/* *******************************************************************
 * Copyright (c) 2003 Contributors
 * All rights reserved. 
 * This program and the accompanying materials are made available 
 * under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution and is available at 
 * http://www.eclipse.org/legal/epl-v10.html 
 *  
 * Contributors: 
 *     Wes Isberg     initial implementation
 * ******************************************************************/

package org.aspectj.testing.drivers;

import org.aspectj.ajdt.internal.core.builder.AjState;

import junit.framework.*;

/*
 * Run harness tests as JUnit test suites.
 */
public class AjcHarnessTestsUsingJUnit extends TestCase {

    /**
     * Create TestSuite with harness validation tests.
     * @return Test with all TestSuites and TestCases
     *         for the harness itself.
     */
    public static TestSuite suite() {
        TestSuite result = HarnessJUnitUtil.suite(null, null, null);
        result.addTest(
            HarnessJUnitUtil.suite("harness", 
                new String[] {"../tests/ajcHarnessTests.xml"},
                null
                ));
        result.addTest(
            HarnessJUnitUtil.suite("harness selection tests", 
                new String[] {"testdata/incremental/harness/selectionTest.xml"},
                null
                ));
        return result;
    }
        
	public AjcHarnessTestsUsingJUnit(String name) {
		super(name);
	}
	
	/* (non-Javadoc)
	 * @see junit.framework.TestCase#setUp()
	 */
	protected void setUp() throws Exception {
		super.setUp();
		AjState.FORCE_INCREMENTAL_DURING_TESTING = true;
	}
	
	/* (non-Javadoc)
	 * @see junit.framework.TestCase#tearDown()
	 */
	protected void tearDown() throws Exception {
		super.tearDown();
		AjState.FORCE_INCREMENTAL_DURING_TESTING = false;
	}
}