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

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

Issue 11776032: Unit test for spellchecking 96- through 102-character words (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 years, 11 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 | « chrome/renderer/spellchecker/spellcheck_unittest.cc ('k') | chrome/tools/convert_dict/dic_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/convert_dict/aff_reader.cc
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc
index b24a0d87a4e79885fa2054ad6b752937d84f0f0d..1b6c92320d263d08b6c64a5efd6dcee22fcace48 100644
--- a/chrome/tools/convert_dict/aff_reader.cc
+++ b/chrome/tools/convert_dict/aff_reader.cc
@@ -254,7 +254,7 @@ void AffReader::AddAffix(std::string* rule) {
printf("ERROR: Found 0 terms after slash in affix rule '%s', "
"but need at least 2.\n",
part.c_str());
- return;
+ exit(1);
}
if (after_slash.size() == 1) {
printf("WARNING: Found 1 term after slash in affix rule '%s', "
@@ -277,7 +277,7 @@ void AffReader::AddAffix(std::string* rule) {
if (!EncodingToUTF8(part, &reencoded)) {
printf("ERROR: Cannot encode affix rule part '%s' to utf8.\n",
part.c_str());
- break;
+ exit(1);
}
*rule = rule->substr(0, part_start) + reencoded;
@@ -300,14 +300,14 @@ void AffReader::AddReplacement(std::string* rule) {
if (!EncodingToUTF8(*rule, &utf8rule)) {
printf("ERROR: Cannot encode replacement rule '%s' to utf8.\n",
rule->c_str());
- return;
+ exit(1);
}
// The first space separates key and value.
size_t space_index = utf8rule.find(' ');
if (space_index == std::string::npos) {
printf("ERROR: Did not find a space in '%s'.\n", utf8rule.c_str());
- return;
+ exit(1);
}
std::vector<std::string> split;
split.push_back(utf8rule.substr(0, space_index));
@@ -329,7 +329,7 @@ void AffReader::HandleEncodedCommand(const std::string& line) {
std::string utf8;
if (!EncodingToUTF8(line, &utf8)) {
printf("ERROR: Cannot encode command '%s' to utf8.\n", line.c_str());
- return;
+ exit(1);
}
other_commands_.push_back(utf8);
}
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_unittest.cc ('k') | chrome/tools/convert_dict/dic_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698