add: отчет о покрытии тестами
This commit is contained in:
15
build.gradle
15
build.gradle
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'jacoco'
|
||||
}
|
||||
|
||||
wrapper {
|
||||
@@ -32,3 +33,17 @@ dependencies {
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = '0.8.7'
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
afterEvaluate {
|
||||
classDirectories.setFrom(files(classDirectories.files.collect {
|
||||
fileTree(dir: it,
|
||||
exclude: ['mc/network/api/io/**']
|
||||
)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -19,6 +21,7 @@ public class ByteArrayTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -27,11 +30,13 @@ public class ByteArrayTag extends TagValue {
|
||||
return Arrays.equals(getValue(), that.getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ByteArrayTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ByteTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class ByteTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class ByteTag extends TagValue {
|
||||
return getValue() == byteTag.getValue();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ByteTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
@@ -91,6 +93,7 @@ public class CompoundTag extends TagValue implements Map<String, TagValue>, Seri
|
||||
return map.entrySet();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -99,11 +102,13 @@ public class CompoundTag extends TagValue implements Map<String, TagValue>, Seri
|
||||
return map.equals(that.map);
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(map);
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CompoundTag{"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class DoubleTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class DoubleTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class DoubleTag extends TagValue {
|
||||
return Double.compare(doubleTag.getValue(), getValue()) == 0;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DoubleTag{" +
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
public class EndTag extends TagValue {
|
||||
private static final EndTag INSTANCE = new EndTag();
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class FloatTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class FloatTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class FloatTag extends TagValue {
|
||||
return Float.compare(floatTag.getValue(), getValue()) == 0;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FloatTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -19,6 +21,7 @@ public class IntegerArrayTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -27,11 +30,13 @@ public class IntegerArrayTag extends TagValue {
|
||||
return Arrays.equals(getValue(), that.getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntegerArrayTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class IntegerTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class IntegerTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class IntegerTag extends TagValue {
|
||||
return getValue() == that.getValue();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntegerTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class ListTag extends TagValue implements List<TagValue> {
|
||||
@@ -150,6 +152,7 @@ public class ListTag extends TagValue implements List<TagValue> {
|
||||
return list.subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -158,11 +161,13 @@ public class ListTag extends TagValue implements List<TagValue> {
|
||||
return list.equals(listTag.list) && getListType() == listTag.getListType();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(list, getListType());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ListTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -19,6 +21,7 @@ public class LongArrayTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -27,11 +30,13 @@ public class LongArrayTag extends TagValue {
|
||||
return Arrays.equals(getValue(), that.getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LongArrayTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class LongTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class LongTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class LongTag extends TagValue {
|
||||
return getValue() == longTag.getValue();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LongTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ShortTag extends TagValue {
|
||||
@@ -18,6 +20,7 @@ public class ShortTag extends TagValue {
|
||||
return value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -26,11 +29,13 @@ public class ShortTag extends TagValue {
|
||||
return getValue() == shortTag.getValue();
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ShortTag{" +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mc.nbt;
|
||||
|
||||
import mc.nbt.internal.JacocoExcludeGeneratedReport;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class StringTag extends TagValue {
|
||||
@@ -19,6 +21,7 @@ public class StringTag extends TagValue {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -27,11 +30,13 @@ public class StringTag extends TagValue {
|
||||
return getValue().equals(stringTag.getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getValue());
|
||||
}
|
||||
|
||||
@JacocoExcludeGeneratedReport
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StringTag{" +
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package mc.nbt.internal;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
@Documented
|
||||
@Retention(RUNTIME)
|
||||
@Target({TYPE, METHOD})
|
||||
public @interface JacocoExcludeGeneratedReport {
|
||||
}
|
||||
Reference in New Issue
Block a user