فهرست منبع

[ObjC] add support for the TextFormat constants.

ObjC doesn't support them, but this ensure when tests are added
they will be handled correctly.

The conformance.proto was updated in PR #5566
Thomas Van Lenten 6 سال پیش
والد
کامیت
0c95791509
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      conformance/conformance_objc.m

+ 10 - 0
conformance/conformance_objc.m

@@ -98,6 +98,10 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
           @"ConformanceRequest had a jspb_payload ConformanceRequest.payload;"
           @"ConformanceRequest had a jspb_payload ConformanceRequest.payload;"
           " those aren't supposed to happen with opensource.";
           " those aren't supposed to happen with opensource.";
       break;
       break;
+
+    case ConformanceRequest_Payload_OneOfCase_TextPayload:
+      response.skipped = @"ObjC doesn't support parsing TextFormat";
+      break;
   }
   }
 
 
   if (testMessage) {
   if (testMessage) {
@@ -124,6 +128,12 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
             @"ConformanceRequest had a requested_output_format of JSPB WireFormat; that"
             @"ConformanceRequest had a requested_output_format of JSPB WireFormat; that"
             " isn't supposed to happen with opensource.";
             " isn't supposed to happen with opensource.";
         break;
         break;
+
+      case WireFormat_TextFormat:
+        // ObjC only has partial objc generation, so don't attempt any tests that need
+        // support.
+        response.skipped = @"ObjC doesn't support generating TextFormat";
+        break;
     }
     }
   }
   }