summaryrefslogtreecommitdiff
path: root/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2018-05-10 19:04:49 +0200
committerGitHub <noreply@github.com>2018-05-10 19:04:49 +0200
commitd8e1d2d5739d7d8ffa54530b9945bd539f833935 (patch)
treefeda50d7d3b245c57260364e1d9f580b8566b9f8 /Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
parent6e9d0ff6de961b211d3d010c3633f2d415eb850f (diff)
parent0a3631cc7657d6fe0cb577681092e9b6f926dbb9 (diff)
Merge pull request #6803 from lioncash/tidy
FloatUtils: Remove IntDouble and IntFloat
Diffstat (limited to 'Source/UnitTests/VideoCommon/VertexLoaderTest.cpp')
-rw-r--r--Source/UnitTests/VideoCommon/VertexLoaderTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
index 6ba3c4c464..70a8a96235 100644
--- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
+++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
@@ -10,8 +10,8 @@
#include <gtest/gtest.h> // NOLINT
+#include "Common/BitUtils.h"
#include "Common/Common.h"
-#include "Common/FloatUtils.h"
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/OpcodeDecoding.h"
@@ -72,14 +72,15 @@ protected:
m_src.Write<T, true>(val);
}
- void ExpectOut(float val)
+ void ExpectOut(float expected)
{
// Read unswapped.
- Common::IntFloat expected(val), actual(m_dst.Read<float, false>());
- if (!actual.f || actual.f != actual.f)
- EXPECT_EQ(expected.i, actual.i);
+ const float actual = m_dst.Read<float, false>();
+
+ if (!actual || actual != actual)
+ EXPECT_EQ(Common::BitCast<u32>(expected), Common::BitCast<u32>(actual));
else
- EXPECT_EQ(expected.f, actual.f);
+ EXPECT_EQ(expected, actual);
}
void RunVertices(int count, int expected_count = -1)