Commit 3bc162a8 authored by Jie Luo's avatar Jie Luo

Merge pull request #379 from jskeet/csharp

Remove the C#-specific field_presence_test.proto, using unittest_no_field_presence.proto instead.
parents 98de125a fd1693a3
......@@ -24,15 +24,13 @@ $PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers.Test/TestProtos \
src/google/protobuf/unittest_import_public.proto \
src/google/protobuf/unittest_mset.proto \
src/google/protobuf/unittest_optimize_for.proto \
src/google/protobuf/unittest_no_field_presence.proto \
src/google/protobuf/unknown_enum_test.proto
$PROTOC -Icsharp/protos/extest --csharp_out=csharp/src/ProtocolBuffers.Test/TestProtos \
csharp/protos/extest/unittest_extras_xmltest.proto \
csharp/protos/extest/unittest_issues.proto
$PROTOC -Icsharp --csharp_out=csharp/src/ProtocolBuffers.Test/TestProtos \
csharp/protos/google/protobuf/field_presence_test.proto
$PROTOC -Ibenchmarks --csharp_out=csharp/src/ProtocolBuffers.Test/TestProtos \
benchmarks/google_size.proto \
benchmarks/google_speed.proto
......
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