Here are some more comments about the things that rice pointed out.


http://gwt-code-reviews.appspot.com/620802/diff/8001/9002
File user/test/com/google/gwt/emultest/java/util/ListTestBase.java
(right):

http://gwt-code-reviews.appspot.com/620802/diff/8001/9002#newcode199
user/test/com/google/gwt/emultest/java/util/ListTestBase.java:199:
public void testSubList() {
@rice. Why do you think this would fail? I have simulated this in 1.5
compliance environment and this worked as expected.

On 2010/06/21 20:40:24, Dan Rice wrote:
I think this test will fail (passes in JDK 1.6):

    ArrayList<String> wrappedList = new ArrayList<String>();
    wrappedList.add("A");
    wrappedList.add("B");

    List<String> sub = wrappedList.subList(1, 1);
    sub.remove("A"); // no "A" in range

    // original list is unchanged
    assertEquals(2, wrappedList.size());
    assertEquals("A", wrappedList.get(0));


http://gwt-code-reviews.appspot.com/620802/diff/8001/9002#newcode212
user/test/com/google/gwt/emultest/java/util/ListTestBase.java:212:
assertEquals(testList, Arrays.asList(2, 6, 4));
(E remove(int index)) returns the removed element.
(boolean remove(Object o)) returns true if the list contained element.
Otherwise false.

The first definition is applied here. I think there's nothing wrong with
this test case.

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

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

Reply via email to