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.

Ajc189Tests.java 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*******************************************************************************
  2. * Copyright (c) 2016 Contributors
  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. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc189;
  12. import java.io.File;
  13. import junit.framework.Test;
  14. import org.aspectj.apache.bcel.classfile.JavaClass;
  15. import org.aspectj.testing.XMLBasedAjcTestCase;
  16. /**
  17. * @author Andy Clement
  18. */
  19. public class Ajc189Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  20. public void testNPEAtAspectJ() throws Exception {
  21. runTest("NPE at aspectj");
  22. }
  23. public void testLostBounds() throws Exception {
  24. runTest("lost bounds");
  25. // This type has I added via declare parents
  26. JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "B");
  27. assertEquals("<T:LSomeClass;:LSomeInterface;>LC<TT;>;Ljava/io/Serializable;LI;",jc.getGenericSignature());
  28. jc = getClassFrom(ajc.getSandboxDirectory(), "D");
  29. assertEquals("<T::LSomeInterface;:LSomeOtherInterface;>Ljava/lang/Object;LI;",jc.getGenericSignature());
  30. }
  31. public void testWhileNPE_486203() throws Exception {
  32. runTest("while npe");
  33. }
  34. // public void testOverweaving_352389() throws Exception {
  35. // runTest("overweaving");
  36. // }
  37. // ---
  38. public static Test suite() {
  39. return XMLBasedAjcTestCase.loadSuite(Ajc189Tests.class);
  40. }
  41. @Override
  42. protected File getSpecFile() {
  43. return getClassResource("ajc189.xml");
  44. }
  45. }