Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4304)

Unified Diff: base/i18n/icu_string_conversions_unittest.cc

Issue 5982003: Add SCOPED_TRACEs to ICUStringConversionsTest... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/icu_string_conversions_unittest.cc
===================================================================
--- base/i18n/icu_string_conversions_unittest.cc (revision 70409)
+++ base/i18n/icu_string_conversions_unittest.cc (working copy)
@@ -9,8 +9,10 @@
#include <sstream>
#include "base/basictypes.h"
+#include "base/format_macros.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
+#include "base/stringprintf.h"
#include "base/string_piece.h"
#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -72,6 +74,9 @@
TEST(ICUStringConversionsTest, ConvertCodepageUTF8) {
// Make sure WideToCodepage works like WideToUTF8.
for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) {
+ SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %ls",
+ i, kConvertRoundtripCases[i]));
+
std::string expected(WideToUTF8(kConvertRoundtripCases[i]));
std::string utf8;
EXPECT_TRUE(WideToCodepage(kConvertRoundtripCases[i], kCodepageUTF8,
@@ -237,6 +242,11 @@
TEST(ICUStringConversionsTest, ConvertBetweenCodepageAndWide) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kConvertCodepageCases); ++i) {
+ SCOPED_TRACE(base::StringPrintf(
+ "Test[%" PRIuS "]: <encoded: %s> <codepage: %s>", i,
+ kConvertCodepageCases[i].encoded,
+ kConvertCodepageCases[i].codepage_name));
+
std::wstring wide;
bool success = CodepageToWide(kConvertCodepageCases[i].encoded,
kConvertCodepageCases[i].codepage_name,
@@ -299,6 +309,11 @@
TEST(ICUStringConversionsTest, ConvertBetweenCodepageAndUTF16) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kConvertCodepageCases); ++i) {
+ SCOPED_TRACE(base::StringPrintf(
+ "Test[%" PRIuS "]: <encoded: %s> <codepage: %s>", i,
+ kConvertCodepageCases[i].encoded,
+ kConvertCodepageCases[i].codepage_name));
+
string16 utf16;
bool success = CodepageToUTF16(kConvertCodepageCases[i].encoded,
kConvertCodepageCases[i].codepage_name,
@@ -347,6 +362,11 @@
TEST(ICUStringConversionsTest, ConvertToUtf8AndNormalize) {
std::string result;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kConvertAndNormalizeCases); ++i) {
+ SCOPED_TRACE(base::StringPrintf(
+ "Test[%" PRIuS "]: <encoded: %s> <codepage: %s>", i,
+ kConvertAndNormalizeCases[i].encoded,
+ kConvertAndNormalizeCases[i].codepage_name));
+
bool success = ConvertToUtf8AndNormalize(
kConvertAndNormalizeCases[i].encoded,
kConvertAndNormalizeCases[i].codepage_name, &result);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698