Added more test cases.
This commit is contained in:
parent
2f81a801ef
commit
2f39921381
2 changed files with 19 additions and 9 deletions
|
@ -386,6 +386,14 @@ tstHelper("KA'", "[(K . A), (' . )]",
|
||||||
new String[] { "{B}{DE}" },
|
new String[] { "{B}{DE}" },
|
||||||
"{B}{DE}");
|
"{B}{DE}");
|
||||||
|
|
||||||
|
tstHelper("NA+YA", "{N+}{YA}",
|
||||||
|
new String[] { "{N+YA}" },
|
||||||
|
new String[] { "{N+YA}" },
|
||||||
|
"{N+YA}");
|
||||||
|
|
||||||
|
tstHelper("NE+YA", "{NE}{+-}{YA}",
|
||||||
|
null, null, "!null!");
|
||||||
|
|
||||||
tstHelper("GDAMS'O", "{G}{DA}{M}{S'O}",
|
tstHelper("GDAMS'O", "{G}{DA}{M}{S'O}",
|
||||||
new String[] {
|
new String[] {
|
||||||
"{G+DA}{M+S'O}",
|
"{G+DA}{M+S'O}",
|
||||||
|
@ -7364,6 +7372,8 @@ tstHelper("ZUR");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testACIPConversion() {
|
public void testACIPConversion() {
|
||||||
|
uhelp("NA+YA", "\u0f53\u0fb1"); // DLC FIXME: warn about the extra A
|
||||||
|
uhelp("NE+YA", "[#ERROR CONVERTING ACIP DOCUMENT: THE TSHEG BAR (\"SYLLABLE\") NE+YA HAS THESE ERRORS: Cannot convert ACIP NE+-YA because + is not an ACIP consonant]");
|
||||||
uhelp("tRAStA", "\u0f4a\u0fb2\u0f66\u0f9a");
|
uhelp("tRAStA", "\u0f4a\u0fb2\u0f66\u0f9a");
|
||||||
uhelp("DZHDZHA", "[#WARNING CONVERTING ACIP DOCUMENT: There is a chance that the ACIP DZHDZHA was intended to represent more consonants than we parsed it as representing -- NNYA, e.g., means N+NYA, but you can imagine seeing N+N+YA and typing NNYA for it too.]\u0f5c\u0fac"); // tricky because DZHDZA is not in TMW but DZHDZHA is
|
uhelp("DZHDZHA", "[#WARNING CONVERTING ACIP DOCUMENT: There is a chance that the ACIP DZHDZHA was intended to represent more consonants than we parsed it as representing -- NNYA, e.g., means N+NYA, but you can imagine seeing N+N+YA and typing NNYA for it too.]\u0f5c\u0fac"); // tricky because DZHDZA is not in TMW but DZHDZHA is
|
||||||
uhelp("DZHDZA", "[#WARNING CONVERTING ACIP DOCUMENT: There is a chance that the ACIP DZHDZA was intended to represent more consonants than we parsed it as representing -- NNYA, e.g., means N+NYA, but you can imagine seeing N+N+YA and typing NNYA for it too.]\u0f5c\u0fab");
|
uhelp("DZHDZA", "[#WARNING CONVERTING ACIP DOCUMENT: There is a chance that the ACIP DZHDZA was intended to represent more consonants than we parsed it as representing -- NNYA, e.g., means N+NYA, but you can imagine seeing N+N+YA and typing NNYA for it too.]\u0f5c\u0fab");
|
||||||
|
|
|
@ -153,14 +153,14 @@ class TPairListFactory {
|
||||||
return tail;
|
return tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the largest TPair we can make from the acip
|
/** Returns the largest TPair we can make from the acip starting
|
||||||
* starting from the left. This will return a size zero pair if
|
* from the left. This will return a size zero pair if and only
|
||||||
* and only if acip is the empty string; otherwise, it may return
|
* if acip is the empty string; otherwise, it may return a pair
|
||||||
* a pair with either the left or right component empty. This
|
* with either the left or right component empty. This mutates
|
||||||
* mutates acip when we run into {NA+YA}; it mutates acip into
|
* acip when we run into {NA+YA}; it mutates acip into {N+YA}.
|
||||||
* {N+YA}. For {NE+YA}, it doesn not mutate acip or behave
|
* For {NE+YA}, it does not mutate acip or behave intelligently.
|
||||||
* intelligently. A later phase will need to turn that into
|
* A later phase will need to turn that into {N+YE} or an error
|
||||||
* {N+YE} (DLC). howMuch[0] will be set to the number of
|
* or whatever you like. howMuch[0] will be set to the number of
|
||||||
* characters of acip that this call has consumed. */
|
* characters of acip that this call has consumed. */
|
||||||
private static TPair getFirstConsonantAndVowel(StringBuffer acip,
|
private static TPair getFirstConsonantAndVowel(StringBuffer acip,
|
||||||
int howMuch[]) {
|
int howMuch[]) {
|
||||||
|
|
Loading…
Reference in a new issue