diff options
author | Andy Clement <aclement@pivotal.io> | 2018-02-14 12:40:22 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2018-02-14 12:40:22 -0800 |
commit | 4d81108f378e12fa516acd6da3b8c1bf5c609c7b (patch) | |
tree | 463e9e19e476d0780dc407d1d8be8f9da6eb1836 /testing | |
parent | 9f84167fbca3c07fb11b761e8accf13bcc97890e (diff) | |
download | aspectj-4d81108f378e12fa516acd6da3b8c1bf5c609c7b.tar.gz aspectj-4d81108f378e12fa516acd6da3b8c1bf5c609c7b.zip |
Add intermediate test class that ensures the tests are on J9
Diffstat (limited to 'testing')
-rw-r--r-- | testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java new file mode 100644 index 000000000..826cf55d3 --- /dev/null +++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java @@ -0,0 +1,31 @@ +/* ******************************************************************* + * Copyright (c) 2018 Contributors + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement + * ******************************************************************/ +package org.aspectj.testing; + +/** + * Makes sure tests are running on the right level of JDK. + * + * @author Andy Clement + */ +public abstract class XMLBasedAjcTestCaseForJava9OrLater extends XMLBasedAjcTestCase { + + @Override + public void runTest(String title) { + // Check we are on Java9 + String property = System.getProperty("java.version"); + if (!property.startsWith("9")) { + throw new IllegalStateException("These tests should be run on Java 9 or later"); + } + super.runTest(title); + } + +} |