mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
[BinaryFromat] Simplify subscript operators (NFC) (#167170)
Identified with readability-simplify-subscript-expr.
This commit is contained in:
@@ -40,7 +40,7 @@ TEST_F(MsgPackWriter, TestWriteFixPositiveInt) {
|
||||
MPWriter.write(u);
|
||||
std::string Output = OStream.str();
|
||||
EXPECT_EQ(Output.size(), 1u);
|
||||
EXPECT_EQ(Output.data()[0], static_cast<uint8_t>(u));
|
||||
EXPECT_EQ(Output[0], static_cast<uint8_t>(u));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ TEST_F(MsgPackWriter, TestWriteFixNegativeInt) {
|
||||
MPWriter.write(i);
|
||||
std::string Output = OStream.str();
|
||||
EXPECT_EQ(Output.size(), 1u);
|
||||
EXPECT_EQ(static_cast<int8_t>(Output.data()[0]), static_cast<int8_t>(i));
|
||||
EXPECT_EQ(static_cast<int8_t>(Output[0]), static_cast<int8_t>(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user