summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2025-05-16 21:09:52 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2025-05-16 21:09:52 +0200
commit2102108b1a62c0e30f86e2ceada7d8be03603923 (patch)
tree0a1c1e80e5c638104942006c267106a70f96a7ed
parent404a7c75b24da5842c46988bf19c1d5b330dcca1 (diff)
UnitTests: Remove redundant template type specifers
-rw-r--r--Source/UnitTests/Common/BitSetTest.cpp2
-rw-r--r--Source/UnitTests/Common/BlockingLoopTest.cpp8
-rw-r--r--Source/UnitTests/Common/FloatUtilsTest.cpp2
-rw-r--r--Source/UnitTests/Common/MathUtilTest.cpp34
-rw-r--r--Source/UnitTests/Common/x64EmitterTest.cpp2
-rw-r--r--Source/UnitTests/Core/IOS/ES/FormatsTest.cpp14
6 files changed, 31 insertions, 31 deletions
diff --git a/Source/UnitTests/Common/BitSetTest.cpp b/Source/UnitTests/Common/BitSetTest.cpp
index 397f9fecbe..24937fdf4e 100644
--- a/Source/UnitTests/Common/BitSetTest.cpp
+++ b/Source/UnitTests/Common/BitSetTest.cpp
@@ -88,7 +88,7 @@ TEST(BitSet, BitOps)
TEST(BitSet, InitializerListsAndIteration)
{
- std::vector<int> bits{1, 10, 15, 17, 20, 30};
+ std::vector bits{1, 10, 15, 17, 20, 30};
BitSet32 bs{1, 10, 15, 17, 20, 30};
auto vit = bits.begin();
for (auto i : bs)
diff --git a/Source/UnitTests/Common/BlockingLoopTest.cpp b/Source/UnitTests/Common/BlockingLoopTest.cpp
index e677544f66..4d8856b94e 100644
--- a/Source/UnitTests/Common/BlockingLoopTest.cpp
+++ b/Source/UnitTests/Common/BlockingLoopTest.cpp
@@ -11,10 +11,10 @@
TEST(BlockingLoop, MultiThreaded)
{
Common::BlockingLoop loop;
- std::atomic<int> signaled_a(0);
- std::atomic<int> received_a(0);
- std::atomic<int> signaled_b(0);
- std::atomic<int> received_b(0);
+ std::atomic signaled_a(0);
+ std::atomic received_a(0);
+ std::atomic signaled_b(0);
+ std::atomic received_b(0);
for (int i = 0; i < 100; i++)
{
// Invalidate the current state.
diff --git a/Source/UnitTests/Common/FloatUtilsTest.cpp b/Source/UnitTests/Common/FloatUtilsTest.cpp
index 1c97e3a537..8afc698a47 100644
--- a/Source/UnitTests/Common/FloatUtilsTest.cpp
+++ b/Source/UnitTests/Common/FloatUtilsTest.cpp
@@ -49,7 +49,7 @@ TEST(FloatUtils, FlushToZero)
// Test all subnormals as well as an equally large set of random normal floats.
std::default_random_engine engine(0);
- std::uniform_int_distribution<u32> dist(0x00800000u, 0x7fffffffu);
+ std::uniform_int_distribution dist(0x00800000u, 0x7fffffffu);
for (u32 i = 0; i <= 0x007fffffu; ++i)
{
u32 i_tmp = i;
diff --git a/Source/UnitTests/Common/MathUtilTest.cpp b/Source/UnitTests/Common/MathUtilTest.cpp
index 7758bb5d7f..966f3a4445 100644
--- a/Source/UnitTests/Common/MathUtilTest.cpp
+++ b/Source/UnitTests/Common/MathUtilTest.cpp
@@ -70,51 +70,51 @@ TEST(MathUtil, SaturatingCast)
TEST(MathUtil, RectangleEquality)
{
- MathUtil::Rectangle<int> rect_a(1, 1, 4, 7);
- MathUtil::Rectangle<int> rect_b(1, 1, 4, 7);
+ MathUtil::Rectangle rect_a(1, 1, 4, 7);
+ MathUtil::Rectangle rect_b(1, 1, 4, 7);
EXPECT_EQ(rect_a, rect_b);
// Left not equal
- MathUtil::Rectangle<int> rect_c(0, 1, 4, 7);
+ MathUtil::Rectangle rect_c(0, 1, 4, 7);
EXPECT_NE(rect_a, rect_c);
// Top not equal
- MathUtil::Rectangle<int> rect_d(1, 3, 4, 7);
+ MathUtil::Rectangle rect_d(1, 3, 4, 7);
EXPECT_NE(rect_a, rect_d);
// Right not equal
- MathUtil::Rectangle<int> rect_e(1, 1, 2, 7);
+ MathUtil::Rectangle rect_e(1, 1, 2, 7);
EXPECT_NE(rect_a, rect_e);
// Bottom not equal
- MathUtil::Rectangle<int> rect_f(1, 1, 4, 9);
+ MathUtil::Rectangle rect_f(1, 1, 4, 9);
EXPECT_NE(rect_a, rect_f);
// No coordinates equal
- MathUtil::Rectangle<int> rect_g(0, 3, 2, 9);
+ MathUtil::Rectangle rect_g(0, 3, 2, 9);
EXPECT_NE(rect_a, rect_g);
}
TEST(MathUtil, RectangleGetWidthSigned)
{
// left < right
- MathUtil::Rectangle<int> rect_a(2, 1, 3, 2);
+ MathUtil::Rectangle rect_a(2, 1, 3, 2);
EXPECT_EQ(rect_a.GetWidth(), 1);
// left > right
- MathUtil::Rectangle<int> rect_b(3, 1, 1, 2);
+ MathUtil::Rectangle rect_b(3, 1, 1, 2);
EXPECT_EQ(rect_b.GetWidth(), 2);
// left == right
- MathUtil::Rectangle<int> rect_c(3, 1, 3, 2);
+ MathUtil::Rectangle rect_c(3, 1, 3, 2);
EXPECT_EQ(rect_c.GetWidth(), 0);
// Most significant bit differs, left < right
- MathUtil::Rectangle<int> rect_d(-9, 1, 1, 2);
+ MathUtil::Rectangle rect_d(-9, 1, 1, 2);
EXPECT_EQ(rect_d.GetWidth(), 10);
// Most significant bit differs, left > right
- MathUtil::Rectangle<int> rect_e(1, 1, -6, 2);
+ MathUtil::Rectangle rect_e(1, 1, -6, 2);
EXPECT_EQ(rect_e.GetWidth(), 7);
}
@@ -144,23 +144,23 @@ TEST(MathUtil, RectangleGetWidthUnsigned)
TEST(MathUtil, RectangleGetHeightSigned)
{
// top < bottom
- MathUtil::Rectangle<int> rect_a(1, 1, 2, 3);
+ MathUtil::Rectangle rect_a(1, 1, 2, 3);
EXPECT_EQ(rect_a.GetHeight(), 2);
// top > bottom
- MathUtil::Rectangle<int> rect_b(1, 4, 2, 0);
+ MathUtil::Rectangle rect_b(1, 4, 2, 0);
EXPECT_EQ(rect_b.GetHeight(), 4);
// top == bottom
- MathUtil::Rectangle<int> rect_c(1, 3, 2, 3);
+ MathUtil::Rectangle rect_c(1, 3, 2, 3);
EXPECT_EQ(rect_c.GetHeight(), 0);
// Most significant bit differs, top < bottom
- MathUtil::Rectangle<int> rect_d(1, -2, 2, 1);
+ MathUtil::Rectangle rect_d(1, -2, 2, 1);
EXPECT_EQ(rect_d.GetHeight(), 3);
// Most significant bit differs, top > bottom
- MathUtil::Rectangle<int> rect_e(1, 0, 2, -1);
+ MathUtil::Rectangle rect_e(1, 0, 2, -1);
EXPECT_EQ(rect_e.GetHeight(), 1);
}
diff --git a/Source/UnitTests/Common/x64EmitterTest.cpp b/Source/UnitTests/Common/x64EmitterTest.cpp
index 7c5b010ae5..ae69c3f712 100644
--- a/Source/UnitTests/Common/x64EmitterTest.cpp
+++ b/Source/UnitTests/Common/x64EmitterTest.cpp
@@ -194,7 +194,7 @@ protected:
void ExpectBytes(const std::vector<u8> expected_bytes)
{
- const std::vector<u8> code_bytes(code_buffer, emitter->GetWritableCodePtr());
+ const std::vector code_bytes(code_buffer, emitter->GetWritableCodePtr());
EXPECT_EQ(expected_bytes, code_bytes);
diff --git a/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp b/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp
index 56ad5beff1..228dbfa8cb 100644
--- a/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp
+++ b/Source/UnitTests/Core/IOS/ES/FormatsTest.cpp
@@ -31,13 +31,13 @@ TEST(TMDReader, Validity)
tmd = IOS::ES::TMDReader{{1, 2, 3}};
EXPECT_FALSE(tmd.IsValid()) << "IsValid should be false when reading an invalid TMD";
- tmd = IOS::ES::TMDReader{std::vector<u8>(soup01_tmd.cbegin(), soup01_tmd.cend() - 1)};
+ tmd = IOS::ES::TMDReader{std::vector(soup01_tmd.cbegin(), soup01_tmd.cend() - 1)};
EXPECT_FALSE(tmd.IsValid()) << "IsValid should be false when reading an invalid TMD";
- tmd = IOS::ES::TMDReader{std::vector<u8>(soup01_tmd.cbegin(), soup01_tmd.cend())};
+ tmd = IOS::ES::TMDReader{std::vector(soup01_tmd.cbegin(), soup01_tmd.cend())};
EXPECT_TRUE(tmd.IsValid()) << "IsValid should be true when reading a valid TMD";
- tmd = IOS::ES::TMDReader{std::vector<u8>(ios59_tmd.cbegin(), ios59_tmd.cend())};
+ tmd = IOS::ES::TMDReader{std::vector(ios59_tmd.cbegin(), ios59_tmd.cend())};
EXPECT_TRUE(tmd.IsValid()) << "IsValid should be true when reading a valid TMD";
}
@@ -91,7 +91,7 @@ class GameTMDReaderTest : public TMDReaderTest
protected:
void SetUp() override
{
- m_raw_tmd = std::vector<u8>(soup01_tmd.cbegin(), soup01_tmd.cend());
+ m_raw_tmd = std::vector(soup01_tmd.cbegin(), soup01_tmd.cend());
TMDReaderTest::SetUp();
}
u64 GetTitleId() const override { return 0x00010000534f5550; }
@@ -99,7 +99,7 @@ protected:
std::string GetGameID() const override { return "SOUP01"; }
std::vector<u8> GetRawView() const override
{
- return std::vector<u8>(soup01_tmd_view.cbegin(), soup01_tmd_view.cend());
+ return std::vector(soup01_tmd_view.cbegin(), soup01_tmd_view.cend());
}
};
@@ -150,7 +150,7 @@ class IOSTMDReaderTest : public TMDReaderTest
protected:
void SetUp() override
{
- m_raw_tmd = std::vector<u8>(ios59_tmd.cbegin(), ios59_tmd.cend());
+ m_raw_tmd = std::vector(ios59_tmd.cbegin(), ios59_tmd.cend());
TMDReaderTest::SetUp();
}
u64 GetTitleId() const override { return 0x000000010000003b; }
@@ -158,7 +158,7 @@ protected:
std::string GetGameID() const override { return "000000010000003b"; }
std::vector<u8> GetRawView() const override
{
- return std::vector<u8>(ios59_tmd_view.cbegin(), ios59_tmd_view.cend());
+ return std::vector(ios59_tmd_view.cbegin(), ios59_tmd_view.cend());
}
};