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 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 testJarWeaving_433351() {
  21. runTest("jar weaving");
  22. }
  23. public void testJarWeaving_433351_4() {
  24. runTest("jar weaving 4");
  25. }
  26. public void testJarWeaving_433351_3() {
  27. runTest("jar weaving 3");
  28. }
  29. public void testJarWeaving_433351_2() {
  30. runTest("jar weaving 2");
  31. }
  32. public void testNPEAtAspectJ() throws Exception {
  33. runTest("NPE at aspectj");
  34. }
  35. public void testLostBounds() throws Exception {
  36. runTest("lost bounds");
  37. // This type has I added via declare parents
  38. JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "B");
  39. assertEquals("<T:LSomeClass;:LSomeInterface;>LC<TT;>;Ljava/io/Serializable;LI;",jc.getGenericSignature());
  40. jc = getClassFrom(ajc.getSandboxDirectory(), "D");
  41. assertEquals("<T::LSomeInterface;:LSomeOtherInterface;>Ljava/lang/Object;LI;",jc.getGenericSignature());
  42. }
  43. public void testWhileNPE_486203() throws Exception {
  44. runTest("while npe");
  45. }
  46. // public void testOverweaving_352389() throws Exception {
  47. // runTest("overweaving");
  48. // }
  49. // ---
  50. public static Test suite() {
  51. return XMLBasedAjcTestCase.loadSuite(Ajc189Tests.class);
  52. }
  53. @Override
  54. protected File getSpecFile() {
  55. return getClassResource("ajc189.xml");
  56. }
  57. }