Expand test coverage for gh-14200
This commit is contained in:
parent
6ca8fbc2da
commit
aa2829455b
|
|
@ -666,9 +666,19 @@ class DefaultConversionServiceTests {
|
|||
assertThat(converted).isEqualTo(new Byte[]{1, 2, 3});
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // gh-14200, SPR-9566
|
||||
void convertPrimitiveByteArrayToPrimitiveByteArray() {
|
||||
byte[] byteArray = new byte[] {1, 2, 3};
|
||||
byte[] result = conversionService.convert(byteArray, byte[].class);
|
||||
assertThat(result).isSameAs(byteArray);
|
||||
assertThat(result).containsExactly(1, 2, 3);
|
||||
}
|
||||
|
||||
@Test // gh-14200, SPR-9566
|
||||
void convertIntArrayToIntArray() {
|
||||
int[] result = conversionService.convert(new int[] {1, 2, 3}, int[].class);
|
||||
int[] intArray = new int[] {1, 2, 3};
|
||||
int[] result = conversionService.convert(intArray, int[].class);
|
||||
assertThat(result).isSameAs(intArray);
|
||||
assertThat(result).containsExactly(1, 2, 3);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -461,12 +461,12 @@ class GenericConversionServiceTests {
|
|||
assertThat(converter.getSourceTypes().stream().allMatch(td -> Integer.class.equals(td.getType()))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // gh-14200, SPR-9566
|
||||
void convertOptimizeArray() {
|
||||
// SPR-9566
|
||||
byte[] byteArray = new byte[] { 1, 2, 3 };
|
||||
byte[] converted = conversionService.convert(byteArray, byte[].class);
|
||||
assertThat(converted).isSameAs(byteArray);
|
||||
assertThat(converted).containsExactly(1, 2, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue