diff --git a/tests/image/image.cpp b/tests/image/image.cpp index e0acece78f..8272beb6d5 100644 --- a/tests/image/image.cpp +++ b/tests/image/image.cpp @@ -159,7 +159,7 @@ void ImageTestCase::LoadFromFile() { wxImage img; for (unsigned int i=0; i in_stream(url.GetInputStream()); - WX_ASSERT_MESSAGE - ( - ("Opening URL \"%s\" failed.", testData[i].url), - in_stream && in_stream->IsOk() - ); + wxScopedPtr in_stream(url.GetInputStream()); + REQUIRE( in_stream ); + REQUIRE( in_stream->IsOk() ); - wxImage img; + wxImage img; - // NOTE: it's important to inform wxImage about the type of the image being - // loaded otherwise it will try to autodetect the format, but that - // requires a seekable stream! - WX_ASSERT_MESSAGE - ( - ("Loading image from \"%s\" failed.", testData[i].url), - img.LoadFile(*in_stream, testData[i].type) - ); + // NOTE: it's important to inform wxImage about the type of the image being + // loaded otherwise it will try to autodetect the format, but that + // requires a seekable stream! + CHECK( img.LoadFile(*in_stream, testData[i].type) ); + } } } @@ -214,47 +205,49 @@ void ImageTestCase::LoadFromZipStream() { for (unsigned int i=0; i