X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2Fengine%2FDictionaryTest.java;h=53b3a916f692f303075ac0e5c16d39b4ffeea449;hb=e2eb68726dc1efce8d833502c211e445bfc2230b;hp=0451c7e904d73c889f5d3ec21aaf9f85244b465f;hpb=d49dab6bd67bd257fc05dba9f288c5ada3bd2071;p=DictionaryPC.git diff --git a/src/com/hughes/android/dictionary/engine/DictionaryTest.java b/src/com/hughes/android/dictionary/engine/DictionaryTest.java index 0451c7e..53b3a91 100644 --- a/src/com/hughes/android/dictionary/engine/DictionaryTest.java +++ b/src/com/hughes/android/dictionary/engine/DictionaryTest.java @@ -21,6 +21,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; import com.hughes.android.dictionary.engine.Index.IndexEntry; +import com.hughes.util.ListUtil; public class DictionaryTest extends TestCase { @@ -45,7 +46,7 @@ public class DictionaryTest extends TestCase { final Index enIndex = dict.indices.get(0); final RowBase row = enIndex.rows.get(4); - assertEquals("carbonyl chloride (the compound COCl2) (noun)\tossicloruro di carbonio", row.getRawText(false)); + assertEquals("eagle (A gold coin with a face value of $10.00) (noun)\tmoneta di dieci dollari", row.getRawText(false)); raf.close(); } @@ -60,9 +61,10 @@ public class DictionaryTest extends TestCase { assertEquals(2, dict.sources.size()); assertEquals("chemnitz", dict.sources.get(0).name); - assertEquals(0, dict.sources.get(0).pairEntryStart); assertEquals("dictcc", dict.sources.get(1).name); - assertEquals(0, dict.sources.get(1).pairEntryStart); // TODO: rethink this + + assertEquals("chemnitz", dict.pairEntries.get(0).entrySource.name); + assertEquals("dictcc", ListUtil.getLast(dict.pairEntries).entrySource.name); raf.close(); }