aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers.Test
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-06-25 16:42:09 +0100
committerJon Skeet <jonskeet@google.com>2015-06-26 20:13:06 +0100
commitaa5104143cca3bf3e9f44a79f96e394960f45662 (patch)
tree3d7eaffeaac656277657a1410542ab3a2812e68c /csharp/src/ProtocolBuffers.Test
parente75a10d8ff85901021a7c133534b6b87c3c7f072 (diff)
downloadprotobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.gz
protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.bz2
protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.zip
Remove a lot of code which wasn't needed any more.
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test')
-rw-r--r--csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs5
-rw-r--r--csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj1
-rw-r--r--csharp/src/ProtocolBuffers.Test/WireFormatTest.cs60
3 files changed, 0 insertions, 66 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs b/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
index 8c01e16a..fbbdce28 100644
--- a/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
@@ -147,17 +147,14 @@ namespace Google.Protobuf
Assert.AreEqual(messageType, primitiveField.ContainingType);
Assert.AreEqual(UnittestProto3.Descriptor, primitiveField.File);
Assert.AreEqual(FieldType.Int32, primitiveField.FieldType);
- Assert.AreEqual(MappedType.Int32, primitiveField.MappedType);
Assert.IsNull(primitiveField.Options);
Assert.AreEqual("single_nested_enum", enumField.Name);
Assert.AreEqual(FieldType.Enum, enumField.FieldType);
- Assert.AreEqual(MappedType.Enum, enumField.MappedType);
// Assert.AreEqual(TestAllTypes.Types.NestedEnum.DescriptorProtoFile, enumField.EnumType);
Assert.AreEqual("single_foreign_message", messageField.Name);
Assert.AreEqual(FieldType.Message, messageField.FieldType);
- Assert.AreEqual(MappedType.Message, messageField.MappedType);
Assert.AreEqual(ForeignMessage.Descriptor, messageField.MessageType);
}
@@ -169,9 +166,7 @@ namespace Google.Protobuf
FieldDescriptor repeatedField =
TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("repeated_int32");
- Assert.IsFalse(singleField.IsRequired);
Assert.IsFalse(singleField.IsRepeated);
- Assert.IsFalse(repeatedField.IsRequired);
Assert.IsTrue(repeatedField.IsRepeated);
}
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
index e90be51d..80b504aa 100644
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
+++ b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
@@ -89,7 +89,6 @@
<Compile Include="IssuesTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestCornerCases.cs" />
- <Compile Include="WireFormatTest.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.csproj">
diff --git a/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs b/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs
deleted file mode 100644
index dc112565..00000000
--- a/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-#region Copyright notice and license
-
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://github.com/jskeet/dotnet-protobufs/
-// Original C++/Java/Python code:
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#endregion
-
-using System.Reflection;
-using Google.Protobuf.Descriptors;
-using NUnit.Framework;
-
-namespace Google.Protobuf
-{
- public class WireFormatTest
- {
- /// <summary>
- /// Keeps the attributes on FieldType and the switch statement in WireFormat in sync.
- /// </summary>
- [Test]
- public void FieldTypeToWireTypeMapping()
- {
- foreach (FieldInfo field in typeof(FieldType).GetFields(BindingFlags.Static | BindingFlags.Public))
- {
- FieldType fieldType = (FieldType) field.GetValue(null);
- FieldMappingAttribute mapping =
- (FieldMappingAttribute) field.GetCustomAttributes(typeof(FieldMappingAttribute), false)[0];
- Assert.AreEqual(mapping.WireType, WireFormat.GetWireType(fieldType));
- }
- }
- }
-} \ No newline at end of file