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

Side by Side Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/SmallSortedMapTest.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 12 matching lines...) Expand all
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
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 junit.framework.TestCase;
34
35 import java.util.ArrayList; 33 import java.util.ArrayList;
36 import java.util.Arrays; 34 import java.util.Arrays;
37 import java.util.HashMap; 35 import java.util.HashMap;
38 import java.util.Iterator; 36 import java.util.Iterator;
39 import java.util.List; 37 import java.util.List;
40 import java.util.Map; 38 import java.util.Map;
41 import java.util.Set; 39 import java.util.Set;
42 import java.util.TreeSet; 40 import java.util.TreeSet;
41 import junit.framework.TestCase;
43 42
44 /** 43 /**
45 * @author darick@google.com Darick Tong 44 * @author darick@google.com Darick Tong
46 */ 45 */
47 public class SmallSortedMapTest extends TestCase { 46 public class SmallSortedMapTest extends TestCase {
48 // java.util.AbstractMap.SimpleEntry is private in JDK 1.5. We re-implement it 47 // java.util.AbstractMap.SimpleEntry is private in JDK 1.5. We re-implement it
49 // here for JDK 1.5 users. 48 // here for JDK 1.5 users.
50 private static class SimpleEntry<K, V> implements Map.Entry<K, V> { 49 private static class SimpleEntry<K, V> implements Map.Entry<K, V> {
51 private final K key; 50 private final K key;
52 private V value; 51 private V value;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 fail("Expected UnsupportedOperationException"); 413 fail("Expected UnsupportedOperationException");
415 } catch (UnsupportedOperationException expected) { 414 } catch (UnsupportedOperationException expected) {
416 } 415 }
417 } 416 }
418 } 417 }
419 418
420 private Set<Integer> makeSortedKeySet(Integer... keys) { 419 private Set<Integer> makeSortedKeySet(Integer... keys) {
421 return new TreeSet<Integer>(Arrays.<Integer>asList(keys)); 420 return new TreeSet<Integer>(Arrays.<Integer>asList(keys));
422 } 421 }
423 } 422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698