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.

SuppressedWarnings.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc150;
  12. import org.aspectj.testing.XMLBasedAjcTestCase;
  13. import junit.framework.Test;
  14. public class SuppressedWarnings extends XMLBasedAjcTestCase {
  15. public static Test suite() {
  16. return XMLBasedAjcTestCase.loadSuite(SuppressedWarnings.class);
  17. }
  18. protected java.net.URL getSpecFile() {
  19. return getClassResource("ajc150.xml");
  20. }
  21. // Check basic suppression
  22. public void testSuppression1() {
  23. runTest("suppressing non-matching advice warnings");
  24. }
  25. // Checks source contexts aren't put out incorrectly
  26. // NOTE: Source contexts only come out if the primary source location in a message
  27. // matches the file currently being dealt with. Because advice not matching
  28. // messages come out at the last stage of compilation, you currently only
  29. // get sourcecontext for advice not matching messages that point to places in
  30. // the last file being processed. You do get source locations in all cases -
  31. // you just don't always get context, we could revisit this sometime...
  32. // (see bug 62073 reference in WeaverMessageHandler.handleMessage())
  33. public void testSuppression2() {
  34. runTest("suppressing non-matching advice warnings when multiple source files involved");
  35. }
  36. public void testSuppressionWithCflow_pr93345() {
  37. runTest("XLint warning for advice not applied with cflow(execution)");
  38. }
  39. public void testSuppressionOfMessagesIssuedDuringMatching() {
  40. runTest("SuppressAjWarnings raised during matching");
  41. }
  42. }