Move EmoticonsAboveSymbols test to rewriter_test.cc

This is just a unittest clean-up.  Hence no behavior change in production is intended.

BUG=none
TEST=unittest

git-svn-id: https://mozc.googlecode.com/svn/trunk@453 a6090854-d499-a067-5803-1114d4e51264
diff --git a/src/converter/converter_test.cc b/src/converter/converter_test.cc
index b64c1fc..010be7b 100644
--- a/src/converter/converter_test.cc
+++ b/src/converter/converter_test.cc
@@ -988,38 +988,6 @@
   EXPECT_TRUE(found);
 }
 
-TEST_F(ConverterTest, EmoticonsAboveSymbols) {
-  scoped_ptr<EngineInterface> engine(MockDataEngineFactory::Create());
-  ConverterInterface *converter = engine->GetConverter();
-  Segments segments;
-
-  // "かおもじ"
-  const char kKey[] = "\xE3\x81\x8B\xE3\x81\x8A\xE3\x82\x82\xE3\x81\x98";
-
-  const char kEmoticon[] = "^^;";
-  // "☹": A platform-dependent symbol
-  const char kSymbol[] = "\xE2\x98\xB9";
-
-  EXPECT_TRUE(converter->StartConversion(
-      &segments, kKey));
-  EXPECT_EQ(1, segments.conversion_segments_size());
-  const Segment &segment = segments.conversion_segment(0);
-  bool found_emoticon = false;
-  bool found_symbol = false;
-
-  for (size_t i = 0; i < segment.candidates_size(); ++i) {
-    if (segment.candidate(i).value == kEmoticon) {
-      found_emoticon = true;
-    } else if (segment.candidate(i).value == kSymbol) {
-      found_symbol = true;
-    }
-    if (found_symbol) {
-      break;
-    }
-  }
-  EXPECT_TRUE(found_emoticon);
-}
-
 TEST_F(ConverterTest, StartSuggestionForRequest) {
   commands::Request client_request;
   client_request.set_mixed_conversion(true);
diff --git a/src/mozc_version_template.txt b/src/mozc_version_template.txt
index a8bf08c..29638ab 100644
--- a/src/mozc_version_template.txt
+++ b/src/mozc_version_template.txt
@@ -1,6 +1,6 @@
 MAJOR=2
 MINOR=16
-BUILD=1992
+BUILD=1993
 REVISION=102
 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
 # downloaded by NaCl Mozc.
diff --git a/src/rewriter/rewriter_test.cc b/src/rewriter/rewriter_test.cc
index 9d5bd5f..eef6679 100644
--- a/src/rewriter/rewriter_test.cc
+++ b/src/rewriter/rewriter_test.cc
@@ -133,4 +133,35 @@
   }
 }
 
+TEST_F(RewriterTest, EmoticonsAboveSymbols) {
+  // "かおもじ"
+  const char kKey[] = "\xE3\x81\x8B\xE3\x81\x8A\xE3\x82\x82\xE3\x81\x98";
+  const char kEmoticon[] = "^^;";
+  // "☹": A platform-dependent symbol
+  const char kSymbol[] = "\xE2\x98\xB9";
+
+  const ConversionRequest request;
+  Segments segments;
+  Segment *seg = segments.push_back_segment();
+  Segment::Candidate *candidate = seg->add_candidate();
+  seg->set_key(kKey);
+  candidate->value = kKey;
+  EXPECT_EQ(1, seg->candidates_size());
+  EXPECT_TRUE(GetRewriter()->Rewrite(request, &segments));
+  EXPECT_LT(1, seg->candidates_size());
+
+  int emoticon_index = -1;
+  int symbol_index = -1;
+  for (size_t i = 0; i < seg->candidates_size(); ++i) {
+    if (seg->candidate(i).value == kEmoticon) {
+      emoticon_index = i;
+    } else if (seg->candidate(i).value == kSymbol) {
+      symbol_index = i;
+    }
+  }
+  EXPECT_NE(-1, emoticon_index);
+  EXPECT_NE(-1, symbol_index);
+  EXPECT_LT(emoticon_index, symbol_index);
+}
+
 }  // namespace mozc