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

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