http://gwt-code-reviews.appspot.com/232801/diff/25001/26007
File bikeshed/src/com/google/gwt/collections/MutableArray.java (right):

http://gwt-code-reviews.appspot.com/232801/diff/25001/26007#newcode112
bikeshed/src/com/google/gwt/collections/MutableArray.java:112: elems =
newElems;
On 2010/03/23 19:31:39, fabbott wrote:
Does this set you up badly after the length 1 to length 0 transition,
i.e.
removing the last element?  It seems _likely_ to work as-is, but is
worth (a) a
test case, and (b) maybe restoring elem==null as an invariant.

Returning back to elem==null seems cleaner to me too.

http://gwt-code-reviews.appspot.com/232801/diff/25001/26008
File bikeshed/test/com/google/gwt/collections/ObjectArrayTest.java
(right):

http://gwt-code-reviews.appspot.com/232801/diff/25001/26008#newcode35
bikeshed/test/com/google/gwt/collections/ObjectArrayTest.java:35:
assertionsEnabled = true;
On 2010/03/23 19:31:39, fabbott wrote:
this is okay, but I didn't have a problem with desiredAssertionStatus
(which I
think has the general advantage of being compile-time constant).

Changed to use desiredAssertionStatus

http://gwt-code-reviews.appspot.com/232801/diff/25001/26008#newcode41
bikeshed/test/com/google/gwt/collections/ObjectArrayTest.java:41: return
"com.google.gwt.collections.Collections";
On 2010/03/23 19:31:39, fabbott wrote:
These mean different things; which do you want?

return null tests as a vanilla JUnit test, which I thought met your
"Java only"
incremental statement.  Return string tests in GWT, i.e. as client
code, either
java (devmode) or JS.  You're probably fine with this change, but
they're not
synonymous.

I'd expected, from the first, that you'd derive a JsObjectArrayTest
and override
to return string, so you'd have two tests one as server Java and one
as client
Java/JS.  Which may be overkill, server java and client java being not
so much
different, but the server-java test should run faster without our
startup
overhead.

Oops. I was testing null vs. "com...Collections" and did not notice I
had not reverted it to null. I think it will be important to have both
sets of tests. These classes are meant to be used both on server and
client sides.

But null is the right option here, I think.

http://gwt-code-reviews.appspot.com/232801/diff/25001/26008#newcode115
bikeshed/test/com/google/gwt/collections/ObjectArrayTest.java:115:
On 2010/03/23 19:31:39, fabbott wrote:
add a add/remove/add test for the 1->0 transition and recovery.

Done.

http://gwt-code-reviews.appspot.com/232801/show

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

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this email with 
the words "REMOVE ME" as the subject.

Reply via email to