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.

Ajc185Tests.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*******************************************************************************
  2. * Copyright (c) 2014 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.ajc185;
  12. import java.io.BufferedInputStream;
  13. import java.io.File;
  14. import java.io.FileInputStream;
  15. import junit.framework.Test;
  16. import org.aspectj.apache.bcel.classfile.JavaClass;
  17. import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
  18. import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
  19. import org.aspectj.testing.XMLBasedAjcTestCase;
  20. /**
  21. * @author Andy Clement
  22. */
  23. public class Ajc185Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  24. public void testUnresolvableMember_456357() throws Exception {
  25. runTest("unresolvable member");
  26. }
  27. // Waiting on JDT fix. Second test is a 'variant' that is also causing me issues but not JDT it seems. Let's
  28. // see what happens when we pick up the real fixes.
  29. // public void testBadAnnos_455608() throws Exception {
  30. // runTest("bad annos");
  31. // JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code2");
  32. // File f = new File(ajc.getSandboxDirectory(), "Code2.class");
  33. // byte[] data = loadFileAsByteArray(f);
  34. // // Will throw ClassFormatException if there is a problem
  35. // new ClassFileReader(data, null);
  36. // }
  37. //
  38. // public void testBadAnnos_455608_2() throws Exception {
  39. // runTest("bad annos 2");
  40. // JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code3");
  41. // File f = new File(ajc.getSandboxDirectory(), "Code3.class");
  42. // byte[] data = loadFileAsByteArray(f);
  43. // // Will throw ClassFormatException if there is a problem
  44. // new ClassFileReader(data, null);
  45. // }
  46. public void testITDInterface_451966() throws Exception {
  47. runTest("itd interface");
  48. }
  49. public void testITDInterface_451966_2() throws Exception {
  50. // call made from inner type
  51. runTest("itd interface - 2");
  52. }
  53. // ---
  54. public static Test suite() {
  55. return XMLBasedAjcTestCase.loadSuite(Ajc185Tests.class);
  56. }
  57. @Override
  58. protected File getSpecFile() {
  59. return getClassResource("ajc185.xml");
  60. }
  61. }