@@ -0,0 +1,1757 @@
+package com.hankcs.hanlp.algorithm;%0A%0Aimport com.hankcs.hanlp.corpus.synonym.Synonym;%0Aimport com.hankcs.hanlp.dictionary.common.CommonSynonymDictionary.SynonymItem;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport java.util.ArrayList;%0A%0Apublic class EditDistanceTest %7B%0A%0A    @Test%0A    public void testComputeCharArray() %7B%0A        Assert.assertEquals(2,%0A            EditDistance.compute(%22foo%22.toCharArray(), %22oof%22.toCharArray()));%0A    %7D%0A%0A    @Test%0A    public void testComputeString() %7B%0A        Assert.assertEquals(2, EditDistance.compute(%22foo%22, %22oof%22));%0A    %7D%0A%0A    @Test%0A    public void testComputeList() %7B%0A        ArrayList%3CSynonymItem%3E synonymItems1 = new ArrayList%3CSynonymItem%3E();%0A        synonymItems1.add(new SynonymItem(new Synonym(%22%22, 32L), null, '='));%0A        %0A        ArrayList%3CSynonymItem%3E synonymItems2 = new ArrayList%3CSynonymItem%3E();%0A        synonymItems2.add(new SynonymItem(new Synonym(%22%22, 64L), null, '='));%0A%0A        Assert.assertEquals(32L,%0A            EditDistance.compute(synonymItems1, synonymItems2));%0A    %7D%0A%0A    @Test%0A    public void testComputeLong() %7B%0A        Assert.assertEquals(3074457345618258602L,%0A            EditDistance.compute(new long%5B%5D%7B%7D, new long%5B%5D%7B4L, 0L%7D));%0A        Assert.assertEquals(-15,%0A            EditDistance.compute(new long%5B%5D%7B-16%7D, new long%5B%5D%7B32%7D));%0A        Assert.assertEquals(0,%0A            EditDistance.compute(new long%5B%5D%7B16%7D, new long%5B%5D%7B16%7D));%0A    %7D%0A%0A    @Test%0A    public void testComputeInt() %7B%0A        Assert.assertEquals(715827882,%0A            EditDistance.compute(new int%5B%5D%7B4, 0%7D, new int%5B%5D%7B%7D));%0A        Assert.assertEquals(6,%0A            EditDistance.compute(new int%5B%5D%7B4, 0%7D, new int%5B%5D%7B8, 16%7D));%0A        Assert.assertEquals(0,%0A            EditDistance.compute(new int%5B%5D%7B16%7D, new int%5B%5D%7B16%7D));%0A    %7D%0A%7D%0A

Add unit tests for com.hankcs.hanlp.algorithm.EditDistance