Bigfoot / Sonarqube (game) (push) Skipped
Bigfoot / Sonarqube (toolmode) (push) Skipped
Bigfoot / Build & Test Debug with clang (Unity Build: OFF, Variant: game) (push) Successful in 1m7s
Bigfoot / Build & Test Debug with clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 1m12s
Bigfoot / Build & Test Debug with clang (Unity Build: ON, Variant: game) (push) Successful in 43s
Bigfoot / Build & Test Debug with clang (Unity Build: ON, Variant: toolmode) (push) Successful in 47s
Bigfoot / Build & Test Debug with clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 2m17s
Bigfoot / Build & Test Debug with clang_asan (Unity Build: ON, Variant: game) (push) Failing after 1m44s
Bigfoot / Build & Test Release with clang (Unity Build: OFF, Variant: game) (push) Successful in 1m9s
Bigfoot / Build & Test Release with clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 1m25s
Bigfoot / Build & Test Release with clang (Unity Build: ON, Variant: game) (push) Successful in 53s
Bigfoot / Build & Test Release with clang (Unity Build: ON, Variant: toolmode) (push) Successful in 1m14s
Bigfoot / Build & Test Release with clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 1m44s
Bigfoot / Build & Test RelWithDebInfo with clang (Unity Build: OFF, Variant: game) (push) Successful in 1m16s
Bigfoot / Build & Test Debug with clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 2m12s
Bigfoot / Build & Test Debug with clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 1m52s
Bigfoot / Build & Test Release with clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 1m51s
Bigfoot / Build & Test Release with clang_asan (Unity Build: ON, Variant: game) (push) Failing after 1m30s
Bigfoot / Build & Test Release with clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 1m35s
Bigfoot / Build & Test RelWithDebInfo with clang (Unity Build: ON, Variant: game) (push) Successful in 49s
Bigfoot / Build & Test RelWithDebInfo with clang (Unity Build: ON, Variant: toolmode) (push) Successful in 50s
Bigfoot / Build & Test RelWithDebInfo with clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 1m16s
Bigfoot / Build & Test RelWithDebInfo with clang_asan (Unity Build: ON, Variant: game) (push) Failing after 1m43s
Bigfoot / Build & Test RelWithDebInfo with clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 1m53s
Bigfoot / Clang Format Checks (push) Successful in 11s
Bigfoot / Build & Test RelWithDebInfo with clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 2m16s
Bigfoot / Build & Test RelWithDebInfo with clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 2m20s
62 lines
1.8 KiB
C++
62 lines
1.8 KiB
C++
/*********************************************************************
|
|
* \file VulkanPixelFormat.cpp
|
|
*
|
|
* \author Romain BOULLARD
|
|
* \date September 2026
|
|
*********************************************************************/
|
|
#include <GraphicsVulkan/VulkanPixelFormat.hpp>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace Bigfoot::Vulkan
|
|
{
|
|
class VulkanPixelFormatFixture: public ::testing::Test
|
|
{
|
|
protected:
|
|
};
|
|
|
|
/****************************************************************************************/
|
|
|
|
TEST_F(VulkanPixelFormatFixture, ToVulkanFormat_MapsUndefinedToAnUndefinedVkFormat)
|
|
{
|
|
EXPECT_EQ(ToVulkanFormat(PixelFormat::Undefined), vk::Format::eUndefined);
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
TEST_F(VulkanPixelFormatFixture, ToVulkanFormat_MapsEveryOtherPixelFormatToANonUndefinedVkFormat)
|
|
{
|
|
for (const PixelFormat format: EnumValuesPixelFormat())
|
|
{
|
|
if (format == PixelFormat::Undefined)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
EXPECT_NE(ToVulkanFormat(format), vk::Format::eUndefined) << EnumNamePixelFormat(format);
|
|
}
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
TEST_F(VulkanPixelFormatFixture, ToVulkanFormat_RoundTripsThroughFromVulkanFormatForEveryPixelFormat)
|
|
{
|
|
for (const PixelFormat format: EnumValuesPixelFormat())
|
|
{
|
|
if (format == PixelFormat::Undefined)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
EXPECT_EQ(FromVulkanFormat(ToVulkanFormat(format)), format) << EnumNamePixelFormat(format);
|
|
}
|
|
}
|
|
|
|
/****************************************************************************************/
|
|
|
|
TEST_F(VulkanPixelFormatFixture, FromVulkanFormat_ReturnsUndefinedForAnUnmappedVkFormat)
|
|
{
|
|
EXPECT_EQ(FromVulkanFormat(vk::Format::eR32G32B32A32Sfloat), PixelFormat::Undefined);
|
|
}
|
|
} // namespace Bigfoot::Vulkan
|