Ejemplo n.º 1
0
        public void EditDistance()
        {
            Spelling _SpellChecker = NewSpellChecker();

            Assertion.AssertEquals("Incorrect EditDistance", 1, _SpellChecker.EditDistance("test", "tst"));
            Assertion.AssertEquals("Incorrect EditDistance", 2, _SpellChecker.EditDistance("test", "tes"));
            Assertion.AssertEquals("Incorrect EditDistance", 0, _SpellChecker.EditDistance("test", "test"));
        }
Ejemplo n.º 2
0
        public void EditDistance()
        {
            Spelling _SpellChecker = NewSpellChecker();

            Assert.True(1 == _SpellChecker.EditDistance("test", "tst"), "Incorrect EditDistance");
            Assert.True(2 == _SpellChecker.EditDistance("test", "tes"), "Incorrect EditDistance");
            Assert.True(0 == _SpellChecker.EditDistance("test", "test"), "Incorrect EditDistance");
        }