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.

XMLBasedAjcTestCaseForJava18OrLater.java 891B

123456789101112131415161718192021222324252627
  1. /* *******************************************************************
  2. * Copyright (c) 2022 Contributors
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. * ******************************************************************/
  9. package org.aspectj.testing;
  10. import org.aspectj.util.LangUtil;
  11. /**
  12. * Makes sure tests are running on the right level of JDK.
  13. *
  14. * @author Alexander Kriegisch
  15. */
  16. public abstract class XMLBasedAjcTestCaseForJava18OrLater extends XMLBasedAjcTestCase {
  17. @Override
  18. public void setUp() throws Exception {
  19. if (!LangUtil.is18VMOrGreater())
  20. throw new IllegalStateException("These tests should be run on Java 18 or later");
  21. super.setUp();
  22. }
  23. }