Skip to content

Commit

Permalink
Merge pull request #386 from google/fix_formatting
Browse files Browse the repository at this point in the history
[NFC] fix formatting
  • Loading branch information
gchatelet authored Feb 26, 2025
2 parents 7d06d41 + c307dc5 commit 0189e5b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions test/cpuinfo_mips_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0189e5b

Please sign in to comment.