[llvm] 8f04a24 - DXContainerTest.cpp - fix MSVC float truncation warning. NFC. (#142349)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 02:47:16 PDT 2025
Author: Simon Pilgrim
Date: 2025-06-02T10:47:13+01:00
New Revision: 8f04a246d05cba448801616e3fded6e264a0a841
URL: https://github.com/llvm/llvm-project/commit/8f04a246d05cba448801616e3fded6e264a0a841
DIFF: https://github.com/llvm/llvm-project/commit/8f04a246d05cba448801616e3fded6e264a0a841.diff
LOG: DXContainerTest.cpp - fix MSVC float truncation warning. NFC. (#142349)
Added:
Modified:
llvm/unittests/Object/DXContainerTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Object/DXContainerTest.cpp b/llvm/unittests/Object/DXContainerTest.cpp
index 68c955300c6bb..28012073d3c78 100644
--- a/llvm/unittests/Object/DXContainerTest.cpp
+++ b/llvm/unittests/Object/DXContainerTest.cpp
@@ -1190,12 +1190,12 @@ TEST(RootSignature, ParseStaticSamplers) {
ASSERT_EQ(Sampler.AddressU, 1u);
ASSERT_EQ(Sampler.AddressV, 2u);
ASSERT_EQ(Sampler.AddressW, 5u);
- ASSERT_FLOAT_EQ(Sampler.MipLODBias, 1.23);
+ ASSERT_FLOAT_EQ(Sampler.MipLODBias, 1.23f);
ASSERT_EQ(Sampler.MaxAnisotropy, 20u);
ASSERT_EQ(Sampler.ComparisonFunc, 4u);
ASSERT_EQ(Sampler.BorderColor, 0u);
- ASSERT_FLOAT_EQ(Sampler.MinLOD, 4.56);
- ASSERT_FLOAT_EQ(Sampler.MaxLOD, 8.9);
+ ASSERT_FLOAT_EQ(Sampler.MinLOD, 4.56f);
+ ASSERT_FLOAT_EQ(Sampler.MaxLOD, 8.9f);
ASSERT_EQ(Sampler.ShaderRegister, 31u);
ASSERT_EQ(Sampler.RegisterSpace, 32u);
ASSERT_EQ(Sampler.ShaderVisibility, 7u);
More information about the llvm-commits
mailing list