Commit 998b5ba2 authored by Jon Skeet's avatar Jon Skeet

Remove the C#-specific field_presence_test.proto, using unittest_no_field_presence.proto instead.

This is the start of establishing a C# namespace of "Google.ProtocolBuffers.TestProtos.Proto3" for proto3-syntax protos.
We could optionally split the directory structure as well into Proto2 and Proto3 for clarity.
parent 98de125a
syntax = "proto3";
package Google.ProtocolBuffers.TestProtos.FieldPresence;
// TODO(jieluo): Add repeated fields, oneof, maps to TestAllTypes
message TestAllTypes {
enum NestedEnum {
FOO = 0;
BAR = 1;
BAZ = 2;
}
message NestedMessage {
optional int32 value = 1;
}
optional int32 optional_int32 = 1;
optional string optional_string = 2;
optional bytes optional_bytes = 3;
optional NestedEnum optional_nested_enum = 4;
optional NestedMessage optional_nested_message = 5;
}
......@@ -33,7 +33,7 @@
using System;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos.FieldPresence;
using Google.ProtocolBuffers.TestProtos.Proto3;
using NUnit.Framework;
namespace Google.ProtocolBuffers
......@@ -177,7 +177,7 @@ namespace Google.ProtocolBuffers
Assert.AreEqual(ByteString.Empty, message.OptionalBytes);
Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO, message.OptionalNestedEnum);
Assert.IsTrue(message.HasOptionalNestedMessage);
Assert.AreEqual(0, message.OptionalNestedMessage.Value);
Assert.AreEqual(0, message.OptionalNestedMessage.Bb);
}
}
}
......@@ -84,7 +84,6 @@
<Compile Include="Compatibility\TestResources.cs" />
<Compile Include="Compatibility\TextCompatibilityTests.cs" />
<Compile Include="Compatibility\XmlCompatibilityTests.cs" />
<Compile Include="TestProtos\FieldPresenceTest.cs" />
<Compile Include="TestProtos\GoogleSize.cs" />
<Compile Include="TestProtos\GoogleSpeed.cs" />
<Compile Include="TestProtos\Unittest.cs" />
......@@ -96,6 +95,7 @@
<Compile Include="TestProtos\UnittestImportPublic.cs" />
<Compile Include="TestProtos\UnittestIssues.cs" />
<Compile Include="TestProtos\UnittestMset.cs" />
<Compile Include="TestProtos\UnittestNoFieldPresence.cs" />
<Compile Include="TestProtos\UnittestOptimizeFor.cs" />
<Compile Include="TestProtos\UnknownEnumTest.cs" />
<Compile Include="TestResources.cs" />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -37,7 +37,7 @@ import "google/protobuf/unittest.proto";
package proto2_nofieldpresence_unittest;
option csharp_namespace = "Google.ProtocolBuffers.TestProtos";
option csharp_namespace = "Google.ProtocolBuffers.TestProtos.Proto3";
// This proto includes every type of field in both singular and repeated
// forms.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment