You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HasMember.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*******************************************************************************
  2. * Copyright (c) 2004 IBM
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * Adrian Colyer - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc150;
  12. import java.io.File;
  13. import junit.framework.Test;
  14. import org.aspectj.testing.XMLBasedAjcTestCase;
  15. public class HasMember extends XMLBasedAjcTestCase {
  16. public static Test suite() {
  17. return XMLBasedAjcTestCase.loadSuite(HasMember.class);
  18. }
  19. protected File getSpecFile() {
  20. return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
  21. }
  22. public void testSimpleDecPHasMethod() {
  23. runTest("declare parents : hasmethod(..) - 1");
  24. }
  25. public void testSimpleDecPHasMethodInherited() {
  26. runTest("declare parents : hasmethod(..) - 2");
  27. }
  28. public void testSimpleDecPHasMethodInheritedPrivate() {
  29. runTest("declare parents : hasmethod(..) - 3");
  30. }
  31. // this test not passing yet, ITD integration not implemented
  32. // public void testDecPHasMethodViaITD() {
  33. // runTest("declare parents : hasmethod(..) - 4");
  34. // }
  35. public void testSimpleDecPHasField() {
  36. runTest("declare parents : hasfield(..) - 1");
  37. }
  38. public void testSimpleDecPHasFieldInherited() {
  39. runTest("declare parents : hasfield(..) - 2");
  40. }
  41. public void testSimpleDecPHasFieldInheritedPrivate() {
  42. runTest("declare parents : hasfield(..) - 3");
  43. }
  44. }