Hey, John, I'll review the patch.

On Mon, Sep 8, 2008 at 5:53 PM, John Tamplin <[EMAIL PROTECTED]> wrote:
> Finally, it looks like we are not testing StringBuilder at all -- since
> StringBuffer no longer delegates to StringBuilder, I think it needs to be
> tested as well to make sure no cut-and-paste error slips in.  A related
> question -- would it not be better to have code generate one version from
> the other rather than rely on manually keeping them in sync?

The idea of StringBuilderTest is to be thorough enough to detect these
cut-and-paste errors.  Mainly, it seems like we need to make sure that
all the APIs exist, that they call the right thing in the
implementation, and that they pass the arguments in the right order.

FWIW, I generated that version of StringBuilder semi-automatically.  I
actually overwrote the file with StringBuffer.java and then used
search and replace to change StringBuffer to StringBuilder.  There are
a ton of methods in the StringBuffer API, so typos are a real risk.

-Lex

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to