From 0edebd55d7c44597f2c9b42aa34499ba06036b31 Mon Sep 17 00:00:00 2001 From: dchandler Date: Sun, 19 Oct 2003 03:47:33 +0000 Subject: [PATCH] We were dying in the "can ts+h take a ga prefix?" check for GTZHAN. --- source/org/thdl/tib/text/TibTextUtils.java | 4 +++- source/org/thdl/tib/text/ttt/PackageTest.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/org/thdl/tib/text/TibTextUtils.java b/source/org/thdl/tib/text/TibTextUtils.java index 4e2ef71..695b093 100644 --- a/source/org/thdl/tib/text/TibTextUtils.java +++ b/source/org/thdl/tib/text/TibTextUtils.java @@ -1649,7 +1649,9 @@ public class TibTextUtils implements THDLWylieConstants { if (!TibetanMachineWeb.isKnownHashKey(root)) { root = root.replace('+', '-'); if (!TibetanMachineWeb.isKnownHashKey(root)) { - throw new Error("root is, now, " + root); // FIXME: make this an assertion + // If the glyph isn't even in TibetanMachine, then + // it's not able to take any prefix. + return false; } } String ru = TibetanMachineWeb.getUnicodeForWylieForGlyph(root); diff --git a/source/org/thdl/tib/text/ttt/PackageTest.java b/source/org/thdl/tib/text/ttt/PackageTest.java index 1e10d75..b0e2ca5 100644 --- a/source/org/thdl/tib/text/ttt/PackageTest.java +++ b/source/org/thdl/tib/text/ttt/PackageTest.java @@ -465,6 +465,9 @@ tstHelper("KA'", "[(K . A), (' . )]", tstHelper("DAM'O", null, null, null, "{DA}{M}{'O}", 2); tstHelper("D-M'O", null, null, null, "{D}{M'O}", -1); + tstHelper("GTZAN", "{G}{TZA}{N}", null, null, "{G}{TZA}{N}", -1); + tstHelper("GTZHAN", "{G}{TZ}{HA}{N}", null, null, "{G+TZ+HA}{N}", -1); + tstHelper("SHR'I", "{SH}{R'I}", null, null,