• Home
  • Raw
  • Download

Lines Matching refs:codec

68         public void RoundTripWithTag(ICodecTestData codec)  in RoundTripWithTag()  argument
70 codec.TestRoundTripWithTag(); in RoundTripWithTag()
74 public void RoundTripRaw(ICodecTestData codec) in RoundTripRaw() argument
76 codec.TestRoundTripRaw(); in RoundTripRaw()
80 public void CalculateSize(ICodecTestData codec) in CalculateSize() argument
82 codec.TestCalculateSizeWithTag(); in CalculateSize()
86 public void DefaultValue(ICodecTestData codec) in DefaultValue() argument
88 codec.TestDefaultValue(); in DefaultValue()
92 public void FixedSize(ICodecTestData codec) in FixedSize() argument
94 codec.TestFixedSize(); in FixedSize()
111 private readonly FieldCodec<T> codec; field in Google.Protobuf.FieldCodecTest.FieldCodecTestData
115 public FieldCodecTestData(FieldCodec<T> codec, T sampleValue, string name) in FieldCodecTestData() argument
117 this.codec = codec; in FieldCodecTestData()
126 codec.ValueWriter(codedOutput, sampleValue); in TestRoundTripRaw()
130 Assert.AreEqual(sampleValue, codec.ValueReader(codedInput)); in TestRoundTripRaw()
138 codec.WriteTagAndValue(codedOutput, sampleValue); in TestRoundTripWithTag()
142 codedInput.AssertNextTag(codec.Tag); in TestRoundTripWithTag()
143 Assert.AreEqual(sampleValue, codec.Read(codedInput)); in TestRoundTripWithTag()
151 codec.WriteTagAndValue(codedOutput, sampleValue); in TestCalculateSizeWithTag()
153 Assert.AreEqual(stream.Position, codec.CalculateSizeWithTag(sampleValue)); in TestCalculateSizeWithTag()
161 codec.WriteTagAndValue(codedOutput, codec.DefaultValue); in TestDefaultValue()
164 Assert.AreEqual(0, codec.CalculateSizeWithTag(codec.DefaultValue)); in TestDefaultValue()
167 Assert.AreEqual(default(T), codec.DefaultValue); in TestDefaultValue()
171 if (codec.DefaultValue != null) // This part isn't appropriate for message types. in TestDefaultValue()
174 codec.ValueWriter(codedOutput, codec.DefaultValue); in TestDefaultValue()
177 Assert.AreEqual(stream.Position, codec.ValueSizeCalculator(codec.DefaultValue)); in TestDefaultValue()
180 Assert.AreEqual(codec.DefaultValue, codec.ValueReader(codedInput)); in TestDefaultValue()
186 Assert.AreEqual(name.Contains("Fixed"), codec.FixedSize != 0); in TestFixedSize()