Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/ProtobufArrayListTest.java

Issue 2599263002: third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Address comments Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 package com.google.protobuf; 31 package com.google.protobuf;
32 32
33 import static java.util.Arrays.asList; 33 import static java.util.Arrays.asList;
34 34
35 import junit.framework.TestCase;
36
37 import java.util.Collections; 35 import java.util.Collections;
38 import java.util.ConcurrentModificationException; 36 import java.util.ConcurrentModificationException;
39 import java.util.Iterator; 37 import java.util.Iterator;
40 import java.util.List; 38 import java.util.List;
39 import junit.framework.TestCase;
41 40
42 /** 41 /**
43 * Tests for {@link ProtobufArrayList}. 42 * Tests for {@link ProtobufArrayList}.
44 */ 43 */
45 public class ProtobufArrayListTest extends TestCase { 44 public class ProtobufArrayListTest extends TestCase {
46 45
47 private static final ProtobufArrayList<Integer> UNARY_LIST = newImmutableProto ArrayList(1); 46 private static final ProtobufArrayList<Integer> UNARY_LIST = newImmutableProto ArrayList(1);
48 private static final ProtobufArrayList<Integer> TERTIARY_LIST = 47 private static final ProtobufArrayList<Integer> TERTIARY_LIST =
49 newImmutableProtoArrayList(1, 2, 3); 48 newImmutableProtoArrayList(1, 2, 3);
50 49
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 279
281 private static ProtobufArrayList<Integer> newImmutableProtoArrayList(int... el ements) { 280 private static ProtobufArrayList<Integer> newImmutableProtoArrayList(int... el ements) {
282 ProtobufArrayList<Integer> list = new ProtobufArrayList<Integer>(); 281 ProtobufArrayList<Integer> list = new ProtobufArrayList<Integer>();
283 for (int element : elements) { 282 for (int element : elements) {
284 list.add(element); 283 list.add(element);
285 } 284 }
286 list.makeImmutable(); 285 list.makeImmutable();
287 return list; 286 return list;
288 } 287 }
289 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698