mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-15 01:57:58 +08:00
Flip gtest _EQ parameter order in minidump_annotation_writer_test.cc
Bug: crashpad:192 Change-Id: I82dddda5ba3d4fe5bf843572e6a793131cb6fa40 Reviewed-on: https://chromium-review.googlesource.com/751441 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
parent
2db30e035a
commit
4d7d4dd56c
@ -52,7 +52,7 @@ TEST(MinidumpAnnotationWriter, EmptyList) {
|
|||||||
|
|
||||||
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 0);
|
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 0);
|
||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
EXPECT_EQ(0u, list->count);
|
EXPECT_EQ(list->count, 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(MinidumpAnnotationWriter, OneItem) {
|
TEST(MinidumpAnnotationWriter, OneItem) {
|
||||||
@ -80,15 +80,16 @@ TEST(MinidumpAnnotationWriter, OneItem) {
|
|||||||
|
|
||||||
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 1);
|
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 1);
|
||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
EXPECT_EQ(1u, list->count);
|
EXPECT_EQ(list->count, 1u);
|
||||||
EXPECT_EQ(kName,
|
EXPECT_EQ(MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
||||||
MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
list->objects[0].name),
|
||||||
list->objects[0].name));
|
kName);
|
||||||
EXPECT_EQ(kType, list->objects[0].type);
|
EXPECT_EQ(list->objects[0].type, kType);
|
||||||
EXPECT_EQ(0u, list->objects[0].reserved);
|
EXPECT_EQ(list->objects[0].reserved, 0u);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
kValue,
|
|
||||||
MinidumpByteArrayAtRVA(string_file.string(), list->objects[0].value));
|
MinidumpByteArrayAtRVA(string_file.string(), list->objects[0].value),
|
||||||
|
kValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(MinidumpAnnotationWriter, ThreeItems) {
|
TEST(MinidumpAnnotationWriter, ThreeItems) {
|
||||||
@ -123,17 +124,18 @@ TEST(MinidumpAnnotationWriter, ThreeItems) {
|
|||||||
|
|
||||||
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 3);
|
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 3);
|
||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
EXPECT_EQ(3u, list->count);
|
EXPECT_EQ(list->count, 3u);
|
||||||
|
|
||||||
for (size_t i = 0; i < 3; ++i) {
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
EXPECT_EQ(kNames[i],
|
EXPECT_EQ(MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
||||||
MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
list->objects[i].name),
|
||||||
list->objects[i].name));
|
kNames[i]);
|
||||||
EXPECT_EQ(kTypes[i], list->objects[i].type);
|
EXPECT_EQ(list->objects[i].type, kTypes[i]);
|
||||||
EXPECT_EQ(0u, list->objects[i].reserved);
|
EXPECT_EQ(list->objects[i].reserved, 0u);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
kValues[i],
|
|
||||||
MinidumpByteArrayAtRVA(string_file.string(), list->objects[i].value));
|
MinidumpByteArrayAtRVA(string_file.string(), list->objects[i].value),
|
||||||
|
kValues[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,23 +166,25 @@ TEST(MinidumpAnnotationWriter, DuplicateNames) {
|
|||||||
|
|
||||||
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 2);
|
auto* list = MinidumpAnnotationListAtStart(string_file.string(), 2);
|
||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
EXPECT_EQ(2u, list->count);
|
EXPECT_EQ(list->count, 2u);
|
||||||
|
|
||||||
EXPECT_EQ(kName,
|
EXPECT_EQ(MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
||||||
MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
list->objects[0].name),
|
||||||
list->objects[0].name));
|
kName);
|
||||||
EXPECT_EQ(kType, list->objects[0].type);
|
EXPECT_EQ(list->objects[0].type, kType);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
kValue1,
|
|
||||||
MinidumpByteArrayAtRVA(string_file.string(), list->objects[0].value));
|
|
||||||
|
|
||||||
EXPECT_EQ(kName,
|
MinidumpByteArrayAtRVA(string_file.string(), list->objects[0].value),
|
||||||
MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
kValue1);
|
||||||
list->objects[1].name));
|
|
||||||
EXPECT_EQ(kType, list->objects[1].type);
|
EXPECT_EQ(MinidumpUTF8StringAtRVAAsString(string_file.string(),
|
||||||
|
list->objects[1].name),
|
||||||
|
kName);
|
||||||
|
EXPECT_EQ(list->objects[1].type, kType);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
kValue2,
|
|
||||||
MinidumpByteArrayAtRVA(string_file.string(), list->objects[1].value));
|
MinidumpByteArrayAtRVA(string_file.string(), list->objects[1].value),
|
||||||
|
kValue2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user