Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ tasks.withType<JavaCompile>().configureEach {
"FormatStringConcatenation",
"IdentityConversion",
"LexicographicalAnnotationAttributeListing", // We don`t want to use this: https://github.com/junit-team/junit-framework/pull/5043#pullrequestreview-3330615838
"LexicographicalAnnotationListing",
"MissingTestCall",
"NestedOptionals",
"NonStaticImport",
Expand All @@ -52,6 +51,7 @@ tasks.withType<JavaCompile>().configureEach {
"TimeZoneUsage",
)
error(
"LexicographicalAnnotationListing",
"PackageLocation",
"RedundantStringConversion",
"RedundantStringEscape",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
* @see TestFactory
* @see TestInstance
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
public @interface AfterAll {
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
* @see TestFactory
* @see TestTemplate
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
public @interface AfterEach {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3718,8 +3718,8 @@ public static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object act
*
* @since 5.8
*/
@Contract("_, null, _ -> fail")
@API(status = STABLE, since = "5.10")
@Contract("_, null, _ -> fail")
public static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue,
Supplier<@Nullable String> messageSupplier) {
return AssertInstanceOf.assertInstanceOf(expectedType, actualValue, messageSupplier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ public static void assumingThat(boolean assumption, Executable executable) {
* @throws TestAbortedException always
* @since 5.9
*/
@Contract(" -> fail")
@API(status = STABLE, since = "5.9")
@Contract(" -> fail")
@SuppressWarnings("TypeParameterUnusedInFormals")
public static <V> V abort() {
throw new TestAbortedException();
Expand All @@ -309,8 +309,8 @@ public static <V> V abort() {
* @throws TestAbortedException always
* @since 5.9
*/
@Contract("_ -> fail")
@API(status = STABLE, since = "5.9")
@Contract("_ -> fail")
@SuppressWarnings("TypeParameterUnusedInFormals")
public static <V> V abort(String message) {
throw new TestAbortedException(message);
Expand All @@ -327,8 +327,8 @@ public static <V> V abort(String message) {
* @throws TestAbortedException always
* @since 5.9
*/
@Contract("_ -> fail")
@API(status = STABLE, since = "5.9")
@Contract("_ -> fail")
@SuppressWarnings("TypeParameterUnusedInFormals")
public static <V> V abort(Supplier<String> messageSupplier) {
throw new TestAbortedException(messageSupplier.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
*
* @since 5.11
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = MAINTAINED, since = "5.13.3")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.FIELD })
public @interface AutoClose {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
* @see TestFactory
* @see TestInstance
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
public @interface BeforeAll {
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
* @see TestFactory
* @see TestTemplate
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
public @interface BeforeEach {
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
* @see BeforeClassTemplateInvocationCallback
* @see AfterClassTemplateInvocationCallback
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@API(status = EXPERIMENTAL, since = "6.0")
@Documented
@Inherited
@API(status = EXPERIMENTAL, since = "6.0")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
@Testable
public @interface ClassTemplate {
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
* @see org.junit.jupiter.api.condition.DisabledInNativeImage
* @see org.junit.jupiter.api.extension.ExecutionCondition
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface Disabled {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
* @see DisplayNameGeneration
* @see DisplayNameGenerator
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface DisplayName {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
* @see DisplayNameGenerator
* @see IndicativeSentencesGeneration
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@API(status = STABLE, since = "5.7")
@Documented
@Inherited
@API(status = STABLE, since = "5.7")
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DisplayNameGeneration {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ class IndicativeSentences implements DisplayNameGenerator {
*
* @since 5.13
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@API(status = EXPERIMENTAL, since = "6.0")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface SentenceFragment {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
* @see DisplayNameGenerator.IndicativeSentences
* @see DisplayNameGeneration
*/
@API(status = STABLE, since = "5.10")
@DisplayNameGeneration(IndicativeSentences.class)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@API(status = STABLE, since = "5.10")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
public @interface IndicativeSentencesGeneration {

String DEFAULT_SEPARATOR = ", ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
* @see TestReporter#publishFile(String, MediaType, org.junit.jupiter.api.function.ThrowingConsumer)
* @see org.junit.jupiter.api.extension.ExtensionContext#publishFile(String, MediaType, org.junit.jupiter.api.function.ThrowingConsumer)
*/
@SuppressWarnings("removal")
@API(status = MAINTAINED, since = "5.14")
@SuppressWarnings("removal")
public sealed class MediaType permits org.junit.jupiter.api.extension.MediaType {

private static final Pattern PATTERN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* @see DynamicTest#stream(Stream)
* @see DynamicTest#stream(Iterator)
*/
@FunctionalInterface
@API(status = MAINTAINED, since = "5.13.3")
@FunctionalInterface
public interface NamedExecutable extends Named<Executable>, Executable {
@Override
default String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
* @see TestInstance
* @see TestClassOrder
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Nested {
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
* @see org.junit.jupiter.api.extension.RegisterExtension @RegisterExtension
* @see org.junit.jupiter.api.extension.ExtendWith @ExtendWith
*/
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.9")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
public @interface Order {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
* @see TestInfo
* @see Test
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@TestTemplate
public @interface RepeatedTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
* @see Tags
* @see Test
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@API(status = STABLE, since = "5.0")
@Documented
@Inherited
@Repeatable(Tags.class)
@API(status = STABLE, since = "5.0")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface Tag {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
* @see Tag
* @see java.lang.annotation.Repeatable
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@API(status = STABLE, since = "5.0")
@Documented
@Inherited
@API(status = STABLE, since = "5.0")
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface Tags {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
* @see BeforeEach
* @see AfterEach
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Testable
public @interface Test {
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
* @see ClassOrderer
* @see TestMethodOrder
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@API(status = STABLE, since = "5.10")
@Documented
@Inherited
@API(status = STABLE, since = "5.10")
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TestClassOrder {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
* @see DynamicTest
* @see DynamicContainer
*/
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(status = MAINTAINED, since = "5.3")
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Testable
public @interface TestFactory {
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
* @see Nested @Nested
* @see Execution @Execution
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@API(status = STABLE, since = "5.0")
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TestInstance {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
* @see MethodOrderer
* @see TestClassOrder
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@API(status = STABLE, since = "5.7")
@Documented
@Inherited
@API(status = STABLE, since = "5.7")
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TestMethodOrder {

/**
Expand Down
Loading
Loading