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.

HierarchyDependsTestCase.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  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. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.bcel;
  13. import junit.framework.TestCase;
  14. public class HierarchyDependsTestCase extends TestCase {
  15. public HierarchyDependsTestCase(String arg0) {
  16. super(arg0);
  17. }
  18. public void testToDo() {}
  19. /**
  20. * XXX not currently used, fix tests when using
  21. public void testHierarchyDepends() {
  22. BcelWorld world = new BcelWorld();
  23. TypePatternQuestions questions = new TypePatternQuestions();
  24. ResolvedType runnableType = world.resolve("java.lang.Runnable");
  25. ResolvedType numberType = world.resolve("java.lang.Number");
  26. ResolvedType integerType = world.resolve("java.lang.Integer");
  27. ResolvedType stringType = world.resolve("java.lang.String");
  28. TypePattern numberPattern = new ExactTypePattern(numberType, false);
  29. questions.askQuestion(numberPattern, integerType, TypePattern.STATIC);
  30. questions.askQuestion(numberPattern, integerType, TypePattern.DYNAMIC);
  31. assertNull(questions.anyChanges());
  32. JavaClass saveClass = integerType.getJavaClass();
  33. integerType.replaceJavaClass(stringType.getJavaClass());
  34. assertNotNull(questions.anyChanges());
  35. integerType.replaceJavaClass(saveClass);
  36. assertNull(questions.anyChanges());
  37. TypePattern runnablePattern = new ExactTypePattern(runnableType, false);
  38. questions.askQuestion(runnablePattern, stringType, TypePattern.DYNAMIC);
  39. assertNull(questions.toString(), questions.anyChanges());
  40. saveClass = stringType.getJavaClass();
  41. stringType.replaceJavaClass(numberType.getJavaClass());
  42. assertNotNull(questions.toString(), questions.anyChanges());
  43. stringType.replaceJavaClass(saveClass);
  44. assertNull(questions.toString(), questions.anyChanges());
  45. }
  46. */
  47. }