blob: 3bdb4d6be474df374b830c51661464eea15242dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* *******************************************************************
* Copyright (c) 2021 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
* ******************************************************************/
package org.aspectj.testing;
import org.aspectj.util.LangUtil;
/**
* Makes sure tests are running on the right level of JDK.
*
* @author Alexander Kriegisch
*/
public abstract class XMLBasedAjcTestCaseForJava14Only extends XMLBasedAjcTestCase {
@Override
public void runTest(String title) {
if (!LangUtil.is14VMOrGreater() || LangUtil.is15VMOrGreater()) {
throw new IllegalStateException(
"These tests should be run on Java 14 only " +
"(e.g. because they use version-specific preview features)"
);
}
super.runTest(title);
}
}
|