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

Unified Diff: chrome/tools/convert_dict/convert_dict.cc

Issue 177051: Add some logging in convert_dict (Closed)
Patch Set: '' Created 11 years, 3 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: chrome/tools/convert_dict/convert_dict.cc
===================================================================
--- chrome/tools/convert_dict/convert_dict.cc (revision 25428)
+++ chrome/tools/convert_dict/convert_dict.cc (working copy)
@@ -44,19 +44,28 @@
char buf[buf_size];
for (size_t i = 0; i < org_words.size(); i++) {
int affix_matches = iter.Advance(buf, buf_size, affix_ids);
- if (affix_matches == 0)
- return false; // Found the end before we expectd.
- if (org_words[i].first != buf)
- return false; // Word doesn't match.
+ if (affix_matches == 0) {
+ printf("Found the end before we expected\n");
+ return false;
+ }
- if (affix_matches != static_cast<int>(org_words[i].second.size()))
- return false; // Different number of affix indices.
+ if (org_words[i].first != buf) {
+ printf("Word doesn't match, word #%s\n", buf);
+ return false;
+ }
+ if (affix_matches != static_cast<int>(org_words[i].second.size())) {
+ printf("Different number of affix indices, word #%s\n", buf);
+ return false;
+ }
+
// Check the individual affix indices.
for (size_t affix_index = 0; affix_index < org_words[i].second.size();
affix_index++) {
- if (affix_ids[affix_index] != org_words[i].second[affix_index])
- return false; // Index doesn't match.
+ if (affix_ids[affix_index] != org_words[i].second[affix_index]) {
+ printf("Index doesn't match, word #%s\n", buf);
+ return false;
+ }
}
}
« 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