您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AjcHarnessTestsUsingJUnit.java 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* *******************************************************************
  2. * Copyright (c) 2003 Contributors
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * Wes Isberg initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.testing.drivers;
  13. import org.aspectj.ajdt.internal.core.builder.AjState;
  14. import junit.framework.TestCase;
  15. import junit.framework.TestSuite;
  16. /*
  17. * Run harness tests as JUnit test suites.
  18. */
  19. public class AjcHarnessTestsUsingJUnit extends TestCase {
  20. /**
  21. * Create TestSuite with harness validation tests.
  22. * @return Test with all TestSuites and TestCases
  23. * for the harness itself.
  24. */
  25. public static TestSuite suite() {
  26. TestSuite result = HarnessJUnitUtil.suite(null, null, null);
  27. result.addTest(
  28. HarnessJUnitUtil.suite("harness",
  29. new String[] {"../tests/ajcHarnessTests.xml"},
  30. null
  31. ));
  32. result.addTest(
  33. HarnessJUnitUtil.suite("harness selection tests",
  34. new String[] {"testdata/incremental/harness/selectionTest.xml"},
  35. null
  36. ));
  37. return result;
  38. }
  39. public AjcHarnessTestsUsingJUnit(String name) {
  40. super(name);
  41. }
  42. @Override
  43. protected void setUp() throws Exception {
  44. super.setUp();
  45. AjState.FORCE_INCREMENTAL_DURING_TESTING = true;
  46. }
  47. @Override
  48. protected void tearDown() throws Exception {
  49. super.tearDown();
  50. AjState.FORCE_INCREMENTAL_DURING_TESTING = false;
  51. }
  52. }