mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-03 03:25:28 -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);
|
||||
|
||||
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.
|
||||
// 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);
|
||||
|
||||
// Test that the destination is really taken into account
|
||||
assertSame(destination, result);
|
||||
}
|
||||
catch (IIOException expected) {
|
||||
// TODO: This is thrown by ImageReader.getDestination. But are we happy with that?
|
||||
|
Loading…
x
Reference in New Issue
Block a user