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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 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. public void testSuppressionOfMessagesIssuedDuringMatching() {
  41. runTest("SuppressAjWarnings raised during matching");
  42. }
  43. }