From 5a71c6fdf75b10622954c55becc21f92df5c17c1 Mon Sep 17 00:00:00 2001 From: James Catto Date: Fri, 2 May 2025 14:54:48 +0100 Subject: [PATCH] TG-23029 - added new annotations for @ContributionFromDiffblue and @ManagedByDiffblue --- .../annotations/ContributionFromDiffblue.java | 23 +++++++++++++++++++ .../cover/annotations/ManagedByDiffblue.java | 21 +++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/main/java/com/diffblue/cover/annotations/ContributionFromDiffblue.java create mode 100644 src/main/java/com/diffblue/cover/annotations/ManagedByDiffblue.java diff --git a/src/main/java/com/diffblue/cover/annotations/ContributionFromDiffblue.java b/src/main/java/com/diffblue/cover/annotations/ContributionFromDiffblue.java new file mode 100644 index 0000000..244b696 --- /dev/null +++ b/src/main/java/com/diffblue/cover/annotations/ContributionFromDiffblue.java @@ -0,0 +1,23 @@ +/* + * Copyright 2025 Diffblue Limited. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.diffblue.cover.annotations; + +/** + * Empty interface, required, with the Category annotation, to label JUnit 4 tests in the following + * manner: @Category(ContributionFromDiffblue.class). + * + *

Identifies a test that has contributions from Diffblue. + */ +public interface ContributionFromDiffblue {} diff --git a/src/main/java/com/diffblue/cover/annotations/ManagedByDiffblue.java b/src/main/java/com/diffblue/cover/annotations/ManagedByDiffblue.java new file mode 100644 index 0000000..5887dc9 --- /dev/null +++ b/src/main/java/com/diffblue/cover/annotations/ManagedByDiffblue.java @@ -0,0 +1,21 @@ +/* + * Copyright 2025 Diffblue Limited. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.diffblue.cover.annotations; + +/** + * Empty interface, identifies a test as managed by Diffblue. Tests annotated with this can be + * removed or updated by Diffblue and so should not be adjusted manually. + */ +public interface ManagedByDiffblue {}