1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[llvm-exegesis] Fix unit tests on PowerPC/AArch64.

We were comparing char*s and not contents. Introduced in rL346489.

llvm-svn: 346493
This commit is contained in:
Clement Courbet 2018-11-09 14:08:29 +00:00
parent b0abfd0d17
commit cd4088c8f1
2 changed files with 6 additions and 4 deletions

View File

@ -60,9 +60,10 @@ TEST_F(AArch64TargetTest, SetRegToConstant) {
}
TEST_F(AArch64TargetTest, DefaultPfmCounters) {
EXPECT_EQ(ExegesisTarget_->getPfmCounters("").CycleCounter, "CPU_CYCLES");
const std::string Expected = "CPU_CYCLES";
EXPECT_EQ(ExegesisTarget_->getPfmCounters("").CycleCounter, Expected);
EXPECT_EQ(ExegesisTarget_->getPfmCounters("unknown_cpu").CycleCounter,
"CPU_CYCLES");
Expected);
}
} // namespace

View File

@ -60,9 +60,10 @@ TEST_F(PowerPCTargetTest, SetRegToConstant) {
}
TEST_F(PowerPCTargetTest, DefaultPfmCounters) {
EXPECT_EQ(ExegesisTarget_->getPfmCounters("").CycleCounter, "CYCLES");
const std::string Expected = "CYCLES";
EXPECT_EQ(ExegesisTarget_->getPfmCounters("").CycleCounter, Expected);
EXPECT_EQ(ExegesisTarget_->getPfmCounters("unknown_cpu").CycleCounter,
"CYCLES");
Expected);
}
} // namespace