mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 07:45:13 +08:00
Fix sf::Image
tests
Bitten by a copy pasta error. We can't test for exact pixel values since jpeg compression changes pixel values slightly.
This commit is contained in:
parent
1c037e1cba
commit
6aabb75bcf
@ -196,10 +196,8 @@ TEST_CASE("[Graphics] sf::Image")
|
||||
|
||||
sf::Image loadedImage;
|
||||
REQUIRE(loadedImage.loadFromFile(filename));
|
||||
CHECK(image.getPixel({0, 0}) == sf::Color::Magenta);
|
||||
CHECK(image.getPixel({255, 255}) == sf::Color::Magenta);
|
||||
CHECK(image.getSize() == sf::Vector2u(256, 256));
|
||||
CHECK(image.getPixelsPtr() != nullptr);
|
||||
CHECK(loadedImage.getSize() == sf::Vector2u(256, 256));
|
||||
CHECK(loadedImage.getPixelsPtr() != nullptr);
|
||||
|
||||
CHECK(std::filesystem::remove(filename));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user