[llvm] DXContainerTest.cpp - fix MSVC float truncation warning. NFC. (PR #142349)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 02:00:35 PDT 2025
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/142349
None
>From 4f0ff04dddd548008f1b58d536805889a43e3f1e Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Mon, 2 Jun 2025 09:59:43 +0100
Subject: [PATCH] DXContainerTest.cpp - fix MSVC float truncation warning
---
llvm/unittests/Object/DXContainerTest.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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