mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
win: Some %zu to PRIuS
%zu aborts in system printf functions on Windows, so use PRIuS instead. R=mark@chromium.org, rsesek@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/849193002
This commit is contained in:
parent
7e7b65da1b
commit
cb8c01f410
@ -19,6 +19,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@ -180,8 +181,8 @@ TEST(UUID, FromString) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kCases); ++index) {
|
for (size_t index = 0; index < arraysize(kCases); ++index) {
|
||||||
const TestCase& test_case = kCases[index];
|
const TestCase& test_case = kCases[index];
|
||||||
SCOPED_TRACE(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
base::StringPrintf("index %zu: %s", index, test_case.uuid_string));
|
"index %" PRIuS ": %s", index, test_case.uuid_string));
|
||||||
|
|
||||||
UUID uuid;
|
UUID uuid;
|
||||||
EXPECT_EQ(test_case.success,
|
EXPECT_EQ(test_case.success,
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@ -78,7 +79,8 @@ TEST(CheckedRange, IsValid) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kUnsignedTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kUnsignedTestData); ++index) {
|
||||||
const UnsignedTestData& testcase = kUnsignedTestData[index];
|
const UnsignedTestData& testcase = kUnsignedTestData[index];
|
||||||
SCOPED_TRACE(base::StringPrintf("unsigned index %zu, base 0x%x, size 0x%x",
|
SCOPED_TRACE(base::StringPrintf("unsigned index %" PRIuS
|
||||||
|
", base 0x%x, size 0x%x",
|
||||||
index,
|
index,
|
||||||
testcase.base,
|
testcase.base,
|
||||||
testcase.size));
|
testcase.size));
|
||||||
@ -139,7 +141,8 @@ TEST(CheckedRange, IsValid) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kSignedTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kSignedTestData); ++index) {
|
||||||
const SignedTestData& testcase = kSignedTestData[index];
|
const SignedTestData& testcase = kSignedTestData[index];
|
||||||
SCOPED_TRACE(base::StringPrintf("signed index %zu, base 0x%x, size 0x%x",
|
SCOPED_TRACE(base::StringPrintf("signed index %" PRIuS
|
||||||
|
", base 0x%x, size 0x%x",
|
||||||
index,
|
index,
|
||||||
testcase.base,
|
testcase.base,
|
||||||
testcase.size));
|
testcase.size));
|
||||||
@ -184,8 +187,8 @@ TEST(CheckedRange, ContainsValue) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
||||||
const TestData& testcase = kTestData[index];
|
const TestData& testcase = kTestData[index];
|
||||||
SCOPED_TRACE(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
base::StringPrintf("index %zu, value 0x%x", index, testcase.value));
|
"index %" PRIuS ", value 0x%x", index, testcase.value));
|
||||||
|
|
||||||
EXPECT_EQ(testcase.valid, parent_range.ContainsValue(testcase.value));
|
EXPECT_EQ(testcase.valid, parent_range.ContainsValue(testcase.value));
|
||||||
}
|
}
|
||||||
@ -232,7 +235,7 @@ TEST(CheckedRange, ContainsRange) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
||||||
const TestData& testcase = kTestData[index];
|
const TestData& testcase = kTestData[index];
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu, base 0x%x, size 0x%x",
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS ", base 0x%x, size 0x%x",
|
||||||
index,
|
index,
|
||||||
testcase.base,
|
testcase.base,
|
||||||
testcase.size));
|
testcase.size));
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/string16.h"
|
#include "base/strings/string16.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
@ -45,9 +46,10 @@ TEST(strlcpy, c16lcpy) {
|
|||||||
for (size_t index = 0; index < arraysize(test_characters); ++index) {
|
for (size_t index = 0; index < arraysize(test_characters); ++index) {
|
||||||
base::char16 test_character = test_characters[index];
|
base::char16 test_character = test_characters[index];
|
||||||
SCOPED_TRACE(base::StringPrintf(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
"character index %zu, character 0x%x", index, test_character));
|
"character index %" PRIuS ", character 0x%x", index, test_character));
|
||||||
for (size_t length = 0; length < 256; ++length) {
|
for (size_t length = 0; length < 256; ++length) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", length));
|
SCOPED_TRACE(
|
||||||
|
base::StringPrintf("index %" PRIuS, length));
|
||||||
base::string16 test_string(length, test_character);
|
base::string16 test_string(length, test_character);
|
||||||
|
|
||||||
TestBuffer destination;
|
TestBuffer destination;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user