On Thu, Oct 30, 2008 at 1:25 PM, John Tamplin <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 30, 2008 at 12:21 PM, Scott Blum <[EMAIL PROTECTED]> wrote: > >> Ahh... hmm. Well, ConstantMapTest isn't doing much right now, because it >> needs to implement makeFullMap() to really do anything. I played around >> with the idea of subclassing ConstantMap and overriding the JSNI methods to >> use an internal hash map. Doing so uncovered at least one bug... our map >> entries don't implement equals, hashCode, toString. Here's what I did, you >> can build on this: >> > > So is this actually testing ConstantMap or the no-JSNI version? I am not > sure I see too much value in doing it this way -- since it is immutable, I > think it would be better to just hand-write tests for the specific > functionality we want rather than using Apache's MapTestBase. Also, we test > the actual functionality in I18NTest/etc, so there is overlap already. > No, this is really useful, it tests our entry set, key set, values collection, equality, etc. It already uncovered a bug in an earlier patch. Sure, there could be a bug in the two lines of JSNI code, but we're drastically reducing the potential bug area. --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
