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

Side by Side Diff: third_party/protobuf/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 6 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 #region Copyright notice and license 1 #region Copyright notice and license
2 // Protocol Buffers - Google's data interchange format 2 // Protocol Buffers - Google's data interchange format
3 // Copyright 2015 Google Inc. All rights reserved. 3 // Copyright 2015 Google Inc. All rights reserved.
4 // https://developers.google.com/protocol-buffers/ 4 // https://developers.google.com/protocol-buffers/
5 // 5 //
6 // Redistribution and use in source and binary forms, with or without 6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are 7 // modification, are permitted provided that the following conditions are
8 // met: 8 // met:
9 // 9 //
10 // * Redistributions of source code must retain the above copyright 10 // * Redistributions of source code must retain the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 new FieldCodecTestData<uint>(FieldCodec.ForUInt32(100), 1234, "UInt3 2"), 51 new FieldCodecTestData<uint>(FieldCodec.ForUInt32(100), 1234, "UInt3 2"),
52 new FieldCodecTestData<uint>(FieldCodec.ForFixed32(100), 1234, "Fixe d32"), 52 new FieldCodecTestData<uint>(FieldCodec.ForFixed32(100), 1234, "Fixe d32"),
53 new FieldCodecTestData<long>(FieldCodec.ForInt64(100), -1000, "Int64 "), 53 new FieldCodecTestData<long>(FieldCodec.ForInt64(100), -1000, "Int64 "),
54 new FieldCodecTestData<long>(FieldCodec.ForSInt64(100), -1000, "SInt 64"), 54 new FieldCodecTestData<long>(FieldCodec.ForSInt64(100), -1000, "SInt 64"),
55 new FieldCodecTestData<long>(FieldCodec.ForSFixed64(100), -1000, "SF ixed64"), 55 new FieldCodecTestData<long>(FieldCodec.ForSFixed64(100), -1000, "SF ixed64"),
56 new FieldCodecTestData<ulong>(FieldCodec.ForUInt64(100), 1234, "UInt 64"), 56 new FieldCodecTestData<ulong>(FieldCodec.ForUInt64(100), 1234, "UInt 64"),
57 new FieldCodecTestData<ulong>(FieldCodec.ForFixed64(100), 1234, "Fix ed64"), 57 new FieldCodecTestData<ulong>(FieldCodec.ForFixed64(100), 1234, "Fix ed64"),
58 new FieldCodecTestData<float>(FieldCodec.ForFloat(100), 1234.5f, "Fl oat"), 58 new FieldCodecTestData<float>(FieldCodec.ForFloat(100), 1234.5f, "Fl oat"),
59 new FieldCodecTestData<double>(FieldCodec.ForDouble(100), 1234567890 .5d, "Double"), 59 new FieldCodecTestData<double>(FieldCodec.ForDouble(100), 1234567890 .5d, "Double"),
60 new FieldCodecTestData<ForeignEnum>( 60 new FieldCodecTestData<ForeignEnum>(
61 FieldCodec.ForEnum(100, t => (int) t, t => (ForeignEnum) t), For eignEnum.FOREIGN_BAZ, "Enum"), 61 FieldCodec.ForEnum(100, t => (int) t, t => (ForeignEnum) t), For eignEnum.ForeignBaz, "Enum"),
62 new FieldCodecTestData<ForeignMessage>( 62 new FieldCodecTestData<ForeignMessage>(
63 FieldCodec.ForMessage(100, ForeignMessage.Parser), new ForeignMe ssage { C = 10 }, "Message"), 63 FieldCodec.ForMessage(100, ForeignMessage.Parser), new ForeignMe ssage { C = 10 }, "Message"),
64 }; 64 };
65 #pragma warning restore 0414 65 #pragma warning restore 0414
66 66
67 [Test, TestCaseSource("Codecs")] 67 [Test, TestCaseSource("Codecs")]
68 public void RoundTripWithTag(ICodecTestData codec) 68 public void RoundTripWithTag(ICodecTestData codec)
69 { 69 {
70 codec.TestRoundTripWithTag(); 70 codec.TestRoundTripWithTag();
71 } 71 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 Assert.AreEqual(name.Contains("Fixed"), codec.FixedSize != 0); 186 Assert.AreEqual(name.Contains("Fixed"), codec.FixedSize != 0);
187 } 187 }
188 188
189 public override string ToString() 189 public override string ToString()
190 { 190 {
191 return name; 191 return name;
192 } 192 }
193 } 193 }
194 } 194 }
195 } 195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698