mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-08 18:27:07 -08:00
dev-java/gson: improved test patch in 2.10.2_pre20231128
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
@@ -1,40 +1,13 @@
|
||||
There were 2 failures:
|
||||
1) testAssertionErrorInDeserializationPrintsVersion(com.google.gson.functional.GsonVersionDiagnosticsTest)
|
||||
expected to match: (\(GSON \d\.\d+\.\d)(?:[-.][A-Z]+)?\)$
|
||||
but was : (GSON 2.10.2_pre20231128)
|
||||
at com.google.gson.functional.GsonVersionDiagnosticsTest.ensureAssertionErrorPrintsGsonVersion(GsonVersionDiagnosticsTest.java:91)
|
||||
at com.google.gson.functional.GsonVersionDiagnosticsTest.testAssertionErrorInDeserializationPrintsVersion(GsonVersionDiagnosticsTest.java:79)
|
||||
2) testAssertionErrorInSerializationPrintsVersion(com.google.gson.functional.GsonVersionDiagnosticsTest)
|
||||
expected to match: (\(GSON \d\.\d+\.\d)(?:[-.][A-Z]+)?\)$
|
||||
but was : (GSON 2.10.2_pre20231128)
|
||||
at com.google.gson.functional.GsonVersionDiagnosticsTest.ensureAssertionErrorPrintsGsonVersion(GsonVersionDiagnosticsTest.java:91)
|
||||
at com.google.gson.functional.GsonVersionDiagnosticsTest.testAssertionErrorInSerializationPrintsVersion(GsonVersionDiagnosticsTest.java:71)
|
||||
support our versioning schemes
|
||||
|
||||
FAILURES!!!
|
||||
Tests run: 1335, Failures: 2
|
||||
--- a/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
|
||||
+++ b/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
|
||||
@@ -26,6 +26,7 @@ import com.google.gson.stream.JsonWriter;
|
||||
import java.util.regex.Pattern;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
+import org.junit.Ignore;
|
||||
@@ -35,7 +35,7 @@ import org.junit.Test;
|
||||
public class GsonVersionDiagnosticsTest {
|
||||
// We require a patch number, even if it is .0, consistent with https://semver.org/#spec-item-2.
|
||||
private static final Pattern GSON_VERSION_PATTERN =
|
||||
- Pattern.compile("(\\(GSON \\d\\.\\d+\\.\\d)(?:[-.][A-Z]+)?\\)$");
|
||||
+ Pattern.compile("(\\(GSON \\d\\.\\d+\\.\\d)(?:[-.][A-Z]+|_[a-z]+[0-9]+)?\\)$");
|
||||
|
||||
/**
|
||||
* Functional tests to validate printing of Gson version on AssertionErrors
|
||||
@@ -65,13 +66,13 @@ public class GsonVersionDiagnosticsTest {
|
||||
assertThat("(GSON 2.8.5-SNAPSHOT)").matches(GSON_VERSION_PATTERN);
|
||||
}
|
||||
private Gson gson;
|
||||
|
||||
- @Test
|
||||
+ @Test @Ignore
|
||||
public void testAssertionErrorInSerializationPrintsVersion() {
|
||||
AssertionError e = assertThrows(AssertionError.class, () -> gson.toJson(new TestType()));
|
||||
ensureAssertionErrorPrintsGsonVersion(e);
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ @Test @Ignore
|
||||
public void testAssertionErrorInDeserializationPrintsVersion() {
|
||||
AssertionError e =
|
||||
assertThrows(AssertionError.class, () -> gson.fromJson("{'a':'abc'}", TestType.class));
|
||||
|
||||
Reference in New Issue
Block a user