WireFormatTest.cs 663 B

1234567891011121314151617181920
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using NUnit.Framework;
  5. using Google.ProtocolBuffers.Descriptors;
  6. namespace Google.ProtocolBuffers {
  7. [TestFixture]
  8. public class WireFormatTest {
  9. [Test]
  10. public void FieldTypeToWireTypeMapping() {
  11. // Just test a few values
  12. Assert.AreEqual(WireFormat.WireType.Fixed64, WireFormat.FieldTypeToWireFormatMap[FieldType.SFixed64]);
  13. Assert.AreEqual(WireFormat.WireType.LengthDelimited, WireFormat.FieldTypeToWireFormatMap[FieldType.String]);
  14. Assert.AreEqual(WireFormat.WireType.LengthDelimited, WireFormat.FieldTypeToWireFormatMap[FieldType.Message]);
  15. }
  16. }
  17. }