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:
Chris Thrasher 2023-10-21 11:29:01 -05:00
parent 1c037e1cba
commit 6aabb75bcf

View File

@ -196,10 +196,8 @@ TEST_CASE("[Graphics] sf::Image")
sf::Image loadedImage; sf::Image loadedImage;
REQUIRE(loadedImage.loadFromFile(filename)); REQUIRE(loadedImage.loadFromFile(filename));
CHECK(image.getPixel({0, 0}) == sf::Color::Magenta); CHECK(loadedImage.getSize() == sf::Vector2u(256, 256));
CHECK(image.getPixel({255, 255}) == sf::Color::Magenta); CHECK(loadedImage.getPixelsPtr() != nullptr);
CHECK(image.getSize() == sf::Vector2u(256, 256));
CHECK(image.getPixelsPtr() != nullptr);
CHECK(std::filesystem::remove(filename)); CHECK(std::filesystem::remove(filename));
} }