1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 05:11:15 +02:00

Merge pull request #386 from google/fix_formatting

[NFC] fix formatting
This commit is contained in:
Guillaume Chatelet
2025-02-26 13:31:36 +01:00
committed by GitHub

View File

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