mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
Hardened test for unsupported types.
This commit is contained in:
parent
608df15066
commit
edb1c481d9
@ -1194,11 +1194,14 @@ public abstract class ImageReaderAbstractTestCase<T extends ImageReader> extends
|
|||||||
param.setDestination(destination);
|
param.setDestination(destination);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
reader.read(0, param);
|
BufferedImage result = reader.read(0, param);
|
||||||
|
|
||||||
// NOTE: We allow the reader to read, as it's inconvenient to test all possible cases.
|
// NOTE: We allow the reader to read, as it's inconvenient to test all possible cases.
|
||||||
// However, it may NOT fail with any other exception in that case.
|
// However, it may NOT fail with any other exception in that case.
|
||||||
System.err.println("WARNING: Reader does not throw exception with non-declared destination: " + destination);
|
System.err.println("WARNING: Reader does not throw exception with non-declared destination: " + destination);
|
||||||
|
|
||||||
|
// Test that the destination is really taken into account
|
||||||
|
assertSame(destination, result);
|
||||||
}
|
}
|
||||||
catch (IIOException expected) {
|
catch (IIOException expected) {
|
||||||
// TODO: This is thrown by ImageReader.getDestination. But are we happy with that?
|
// TODO: This is thrown by ImageReader.getDestination. But are we happy with that?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user