mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #13569 from tygyh/UnitTests-Use-constexpr
UnitTests: Use `constexpr`
This commit is contained in:
@ -14,11 +14,11 @@ TEST(ESFormats, TitleType)
|
||||
EXPECT_TRUE(IOS::ES::IsTitleType(Titles::SYSTEM_MENU, IOS::ES::TitleType::System));
|
||||
EXPECT_FALSE(IOS::ES::IsDiscTitle(Titles::SYSTEM_MENU));
|
||||
|
||||
const u64 ios59_title_id = 0x000000010000003b;
|
||||
constexpr u64 ios59_title_id = 0x000000010000003b;
|
||||
EXPECT_TRUE(IOS::ES::IsTitleType(ios59_title_id, IOS::ES::TitleType::System));
|
||||
EXPECT_FALSE(IOS::ES::IsDiscTitle(ios59_title_id));
|
||||
|
||||
const u64 ztp_title_id = 0x00010000525a4445;
|
||||
constexpr u64 ztp_title_id = 0x00010000525a4445;
|
||||
EXPECT_TRUE(IOS::ES::IsTitleType(ztp_title_id, IOS::ES::TitleType::Game));
|
||||
EXPECT_TRUE(IOS::ES::IsDiscTitle(ztp_title_id));
|
||||
}
|
||||
|
@ -130,11 +130,11 @@ TEST(Skylanders, Keygen)
|
||||
std::array<u8, 4> nuid;
|
||||
u8 sector;
|
||||
u64 expected;
|
||||
} const inputs[]{{{0x00, 0x00, 0x00, 0x00}, 0, 0x4B0B20107CCB},
|
||||
{{0x94, 0xB0, 0xEE, 0x2D}, 0, 0x4B0B20107CCB},
|
||||
{{0x00, 0x00, 0x00, 0x00}, 11, 0xEA168579FF28},
|
||||
{{0x94, 0xB0, 0xEE, 0x2D}, 1, 0x278e4DA896B5},
|
||||
{{0xF7, 0xDB, 0xFD, 0x5F}, 2, 0x75B9B1F4B9EB}};
|
||||
} constexpr inputs[]{{{0x00, 0x00, 0x00, 0x00}, 0, 0x4B0B20107CCB},
|
||||
{{0x94, 0xB0, 0xEE, 0x2D}, 0, 0x4B0B20107CCB},
|
||||
{{0x00, 0x00, 0x00, 0x00}, 11, 0xEA168579FF28},
|
||||
{{0x94, 0xB0, 0xEE, 0x2D}, 1, 0x278e4DA896B5},
|
||||
{{0xF7, 0xDB, 0xFD, 0x5F}, 2, 0x75B9B1F4B9EB}};
|
||||
|
||||
for (auto& test : inputs)
|
||||
{
|
||||
|
Reference in New Issue
Block a user