# | Line 59 | Line 59 | public class Collection8Test extends JSR | |
---|---|---|
59 | /** Checks properties of empty collections. */ | |
60 | public void testEmptyMeansEmpty() { | |
61 | Collection c = impl.emptyCollection(); | |
62 | + | emptyMeansEmpty(c); |
63 | + | |
64 | + | if (c instanceof java.io.Serializable) |
65 | + | emptyMeansEmpty(serialClone(c)); |
66 | + | |
67 | + | Collection clone = cloneableClone(c); |
68 | + | if (clone != null) |
69 | + | emptyMeansEmpty(clone); |
70 | + | } |
71 | + | |
72 | + | void emptyMeansEmpty(Collection c) { |
73 | assertTrue(c.isEmpty()); | |
74 | assertEquals(0, c.size()); | |
75 | assertEquals("[]", c.toString()); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |