Android Open Source - sdk-spellchecker Test Spell Checker






From Project

Back to project page sdk-spellchecker.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project sdk-spellchecker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.silpa.spellchecker;
//  w w  w.  j  a  v  a 2 s  . c o  m
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;


public class TestSpellChecker extends AndroidTestCase {
    @Override
    protected void setUp() throws Exception {
        super.setUp();
    }

    @SmallTest
    @MediumTest
    @LargeTest
    public void testConstructor() {
        SpellChecker spellChecker = new SpellChecker(getContext());
        assertNotNull(spellChecker);
    }

    @SmallTest
    @MediumTest
    @LargeTest
    public void testCheck() {
        SpellChecker spellChecker = new SpellChecker(getContext());

        // test english
        assertTrue(spellChecker.check("Judicious"));
        assertFalse(spellChecker.check("Judecious"));

        // test malayalam
        assertTrue(spellChecker.check("??????"));
        assertTrue(spellChecker.check("??????"));

        // test hindi
        assertTrue(spellChecker.check("?????"));
    }

    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }
}




Java Source Code List

org.silpa.spellchecker.SpellChecker.java
org.silpa.spellchecker.TestSpellChecker.java