1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-27 07:02:30 +02:00

[NFC] fix formatting

This commit is contained in:
Guillaume Chatelet 2025-02-26 10:59:45 +00:00
parent 7d06d41064
commit c307dc5963

View File

@ -25,15 +25,16 @@ namespace cpu_features {
namespace {
TEST(CpuinfoMipsTest, MipsFeaturesEnum) {
const char *last_name = GetMipsFeaturesEnumName(MIPS_LAST_);
EXPECT_STREQ(last_name, "unknown_feature");
for (int i = static_cast<int>(MIPS_MSA); i != static_cast<int>(MIPS_LAST_); ++i) {
const auto feature = static_cast<MipsFeaturesEnum>(i);
const char *name = GetMipsFeaturesEnumName(feature);
ASSERT_FALSE(name == nullptr);
EXPECT_STRNE(name, "");
EXPECT_STRNE(name, last_name);
}
const char* last_name = GetMipsFeaturesEnumName(MIPS_LAST_);
EXPECT_STREQ(last_name, "unknown_feature");
for (int i = static_cast<int>(MIPS_MSA); i != static_cast<int>(MIPS_LAST_);
++i) {
const auto feature = static_cast<MipsFeaturesEnum>(i);
const char* name = GetMipsFeaturesEnumName(feature);
ASSERT_FALSE(name == nullptr);
EXPECT_STRNE(name, "");
EXPECT_STRNE(name, last_name);
}
}
TEST(CpuinfoMipsTest, FromHardwareCapBoth) {
@ -144,7 +145,8 @@ VCEI exceptions : not available
TEST(CpuinfoMipsTest, BCM1250) {
ResetHwcaps();
auto& fs = GetEmptyFilesystem();
fs.CreateFile("/proc/cpuinfo", R"(system type : SiByte BCM91250A (SWARM)
fs.CreateFile("/proc/cpuinfo",
R"(system type : SiByte BCM91250A (SWARM)
processor : 0
cpu model : SiByte SB1 V0.2 FPU V0.2
BogoMIPS : 532.48