浏览代码

[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;"
           " those aren't supposed to happen with opensource.";
       break;
+
+    case ConformanceRequest_Payload_OneOfCase_TextPayload:
+      response.skipped = @"ObjC doesn't support parsing TextFormat";
+      break;
   }
 
   if (testMessage) {
@@ -124,6 +128,12 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
             @"ConformanceRequest had a requested_output_format of JSPB WireFormat; that"
             " isn't supposed to happen with opensource.";
         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;
     }
   }