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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: 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 protobuf_unittest.UnittestProto.TestAllExtensions; 33 import protobuf_unittest.UnittestProto.TestAllExtensions;
34 import protobuf_unittest.UnittestProto.TestAllTypes; 34 import protobuf_unittest.UnittestProto.TestAllTypes;
35
36 import junit.framework.TestCase;
37
35 import java.io.IOException; 38 import java.io.IOException;
36 import junit.framework.TestCase;
37 39
38 /** 40 /**
39 * Unit test for {@link LazyField}. 41 * Unit test for {@link LazyField}.
40 * 42 *
41 * @author xiangl@google.com (Xiang Li) 43 * @author xiangl@google.com (Xiang Li)
42 */ 44 */
43 public class LazyFieldTest extends TestCase { 45 public class LazyFieldTest extends TestCase {
44 public void testHashCode() { 46 public void testHashCode() {
45 MessageLite message = TestUtil.getAllSet(); 47 MessageLite message = TestUtil.getAllSet();
46 LazyField lazyField = 48 LazyField lazyField =
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 builder.addRepeatedBool(true); 113 builder.addRepeatedBool(true);
112 MessageLite newMessage = builder.build(); 114 MessageLite newMessage = builder.build();
113 lazyField.setValue(newMessage); 115 lazyField.setValue(newMessage);
114 } 116 }
115 117
116 private void assertNotEqual(Object unexpected, Object actual) { 118 private void assertNotEqual(Object unexpected, Object actual) {
117 assertFalse(unexpected == actual 119 assertFalse(unexpected == actual
118 || (unexpected != null && unexpected.equals(actual))); 120 || (unexpected != null && unexpected.equals(actual)));
119 } 121 }
120 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698