Search in sources :

Example 1 with Replaceable

use of android.icu.text.Replaceable in project j2objc by google.

the class TransliteratorTest method CheckIncrementalAux.

public void CheckIncrementalAux(Transliterator t, String input) {
    Replaceable test = new ReplaceableString(input);
    Transliterator.Position pos = new Transliterator.Position(0, test.length(), 0, test.length());
    t.transliterate(test, pos);
    boolean gotError = false;
    if (pos.start == 0 && pos.limit != 0 && !t.getID().equals("Hex-Any/Unicode")) {
        errln("No Progress, " + t.getID() + ": " + UtilityExtensions.formatInput(test, pos));
        gotError = true;
    } else {
        logln("PASS Progress, " + t.getID() + ": " + UtilityExtensions.formatInput(test, pos));
    }
    t.finishTransliteration(test, pos);
    if (pos.start != pos.limit) {
        errln("Incomplete, " + t.getID() + ":  " + UtilityExtensions.formatInput(test, pos));
        gotError = true;
    }
    if (!gotError) {
    // errln("FAIL: Did not get expected error");
    }
}
Also used : ReplaceableString(android.icu.text.ReplaceableString) Replaceable(android.icu.text.Replaceable) Transliterator(android.icu.text.Transliterator)

Aggregations

Replaceable (android.icu.text.Replaceable)1 ReplaceableString (android.icu.text.ReplaceableString)1 Transliterator (android.icu.text.Transliterator)1