2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-26 19:08:07 +00:00
Files
OpenAssetTools/test/ObjCommonTests/Image/ImageFormatTests.cpp
T
Jan 255c424aac fix: t6 modman textures (#849)
* feat: dynamically decompress bc5 textures for modman

* chore: restructure image format class

* chore: keep dds file conversions

* chore: convert all kinds of webgl unsupported formats

* chore: add decompressors for remaining formats

* chore: always set full alpha if available on bc4 and bc5 decompression
2026-06-22 07:02:35 +02:00

20 lines
624 B
C++

#include "Image/ImageFormat.h"
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <type_traits>
namespace image::image_format
{
TEST_CASE("ImageFormat: EnsureAllFormatsArrayIndicesAreIds", "[image]")
{
REQUIRE(static_cast<unsigned int>(ImageFormatId::MAX) == std::extent_v<decltype(format::ALL)>);
for (unsigned i = 0; i < std::extent_v<decltype(format::ALL)>; i++)
{
REQUIRE(format::ALL[i] != nullptr);
REQUIRE(i == static_cast<unsigned>(format::ALL[i]->GetId()));
}
}
} // namespace image::image_format