DuffPane now has the start of a unit test suite. Invoke it via 'ant

clean check'.  Right now there are tests to ensure that typing certain
sequences of keys in the Extended Wylie keyboard gives the expected
Extended Wylie back when "Tools/Convert Tibetan to Wylie" is invoked.

The syntactically illegal d.wa now converts to Tibetan and then back
to d.wa (not dwa, as it did); likewise with the illegal g.wa.  wa
doesn't take any prefixes, but I prefer clean end-to-end
behavior. (jeskd doesn't go end-to-end, though.)

Note that you cannot successfully run the DuffPane tests on a Linux
box unless your DISPLAY variable is set correctly.  Thus, my nightly
builds will fail with an Error (as opposed to a Failure).
This commit is contained in:
dchandler 2003-04-14 05:22:27 +00:00
parent d9b22a43d6
commit efa8fc1f25
8 changed files with 444 additions and 109 deletions

View file

@ -210,6 +210,17 @@ public final class ThdlOptions {
/** to avoid initializing twice */
private static boolean isInitialized = false;
/** Call this when you're testing some code that uses the
* preferences mechanism provided by this class, and you don't
* want to use options.txt etc. with that code. You'll be
* relying on the defaults encoded in the calls to
* getBooleanOption etc. If you call this twice, it will wipe
* out preferences stored programmatically on each call. */
public static void forTestingOnlyInitializeWithoutDefaultOptionsFile() {
userProperties = new Properties(); // empty
isInitialized = true;
}
/** Sets userProperties so that it represents the entire, chained
preferences hierarchy.