From f159250c4e5b3e7c79d1e3f8de48d6dfdb74ba8a Mon Sep 17 00:00:00 2001 From: halx99 Date: Mon, 22 Apr 2024 23:07:09 +0800 Subject: [PATCH] Don't assert since we remove deprecated pixel formats --- .../Source/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/cpp-tests/Source/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp b/tests/cpp-tests/Source/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp index 9c61049f41..bbbb9b12e3 100644 --- a/tests/cpp-tests/Source/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp +++ b/tests/cpp-tests/Source/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp @@ -84,9 +84,7 @@ void SpriteFrameCachePixelFormatTest::loadSpriteFrames(std::string_view file, const ssize_t bitsPerKB = 8 * 1024; const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width * texture->getContentSizeInPixels().height / bitsPerKB; -#ifndef AX_USE_METAL - AX_ASSERT(texture->getPixelFormat() == expectedFormat); -#endif + const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(), texture->getStringForFormat(), memorySize); infoLabel->setString(textureInfo); @@ -112,7 +110,6 @@ void SpriteFrameCacheLoadMultipleTimes::loadSpriteFrames(std::string_view file, SpriteFrameCache::getInstance()->addSpriteFramesWithFile(file); SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("sprite_frames_test/grossini.png"); Texture2D* texture = spriteFrame->getTexture(); - AX_ASSERT(texture->getPixelFormat() == expectedFormat); SpriteFrameCache::getInstance()->removeSpriteFrameByName("sprite_frames_test/grossini.png"); Director::getInstance()->getTextureCache()->removeTexture(texture); @@ -496,9 +493,6 @@ void SpriteFrameCacheJsonAtlasTest::loadSpriteFrames(std::string_view file, const ssize_t bitsPerKB = 8 * 1024; const double memorySize = 1.0 * texture->getBitsPerPixelForFormat() * texture->getContentSizeInPixels().width * texture->getContentSizeInPixels().height / bitsPerKB; -#ifndef AX_USE_METAL - AX_ASSERT(texture->getPixelFormat() == expectedFormat); -#endif const std::string textureInfo = StringUtils::format("%s%s: %.2f KB\r\n", infoLabel->getString().data(), texture->getStringForFormat(), memorySize); infoLabel->setString(textureInfo);