From 42334bb49343099e71104a9ab2b1d299a16ebe30 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Tue, 17 Dec 2013 17:36:22 +0900 Subject: [PATCH] Quit checking bigram order in BinaryDictDecoderEncoderTests. Change-Id: I1b8eb6ab2ea797d2590495b1f57f9ec9560ea817 --- .../latin/makedict/BinaryDictDecoderEncoderTests.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java index 8f7f31d18..8c5da254b 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java @@ -355,25 +355,25 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { } // check bigrams - final HashMap> expBigrams = new HashMap>(); + final HashMap> expBigrams = new HashMap>(); for (int i = 0; i < expectedBigrams.size(); ++i) { final String word1 = expectedWords.get(expectedBigrams.keyAt(i)); for (int w2 : expectedBigrams.valueAt(i)) { if (expBigrams.get(word1) == null) { - expBigrams.put(word1, new ArrayList()); + expBigrams.put(word1, new HashSet()); } expBigrams.get(word1).add(expectedWords.get(w2)); } } - final HashMap> actBigrams = new HashMap>(); + final HashMap> actBigrams = new HashMap>(); for (Entry> entry : resultBigrams.entrySet()) { final String word1 = resultWords.get(entry.getKey()); final int unigramFreq = resultFrequencies.get(entry.getKey()); for (PendingAttribute attr : entry.getValue()) { final String word2 = resultWords.get(attr.mAddress); if (actBigrams.get(word1) == null) { - actBigrams.put(word1, new ArrayList()); + actBigrams.put(word1, new HashSet()); } actBigrams.get(word1).add(word2); @@ -382,7 +382,6 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { assertTrue(Math.abs(bigramFreq - BIGRAM_FREQ) < TOLERANCE_OF_BIGRAM_FREQ); } } - assertEquals(actBigrams, expBigrams); }