commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [lang.Strings] Unit Test todo list
Date Sat, 13 Jul 2002 06:27:12 GMT
Knocked out the escape, stripAll, getNestedString, defaultString,
getLevenshteinDistance methods.

This basically leaves us with:


There is a test for the latter two methods, but it seems to have problems
succeeding. In fact it exceptions as bad input for me.
StackTrace is not so easy to test due to the dynamic nature of a stack
trace string. Needs some play.
isLine, wordWrap and quoteRegularExpression are all up for debate imo.
isLine doesn't seem to offer any real functionality as few pieces of text
would not contain punctuation, and quoteRegularExpression seems to be of
little use, plus it doesn't account for character classes. WordWrap is a
very useful method, but probably needs more work.

1) I'd like to suggest dropping isLine and quoteRegexp.
2) Any help with the native/unicode would be welcomed
3) Ideas for good ways to test stack trace are welcomed.
4) Views on wordWrap. While good functionality [i think], it has some
quirky errors on some forms of boundary cases. Should there be a WordWrap
class in another package for text formatting?


On Tue, 9 Jul 2002, Stephen Colebourne wrote:

> > > Here's a list of the methods still left to be unit tested in Strings.
> > >
> > >   public static String wordWrap(String str);
> > >   public static String wordWrap(String str, int width);
> > >   public static String wordWrap(String str, int width, String delim,
> String split);
> > >   public static String quoteRegularExpression(String str);
> > >   public static boolean isLine(String str);
> > >   public static String stackTrace(Throwable throwable);
> > >   public static String convertUnicodeToNative(String source, String
> charset)
> > >   public static String convertNativeToUnicode(String input, String
> charset)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message