From df4e4d8717987232499b9be50b24adac179528b3 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 5 Jan 2016 16:31:40 -0500 Subject: Fix up the conformance tests - Update all the new runner cases to handle a skip result as a skip and not a failure. - Make ObjC use the new serialize_error result if it fails to generate the data. --- conformance/conformance_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'conformance/conformance_test.cc') diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index c39bf26d..a232ecc5 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -356,6 +356,8 @@ void ConformanceTestSuite::ExpectParseFailureForProto( RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kParseError) { ReportSuccess(effective_test_name); + } else if (response.result_case() == ConformanceResponse::kSkipped) { + ReportSkip(effective_test_name, request, response); } else { ReportFailure(effective_test_name, request, response, "Should have failed to parse, but didn't."); @@ -408,6 +410,11 @@ void ConformanceTestSuite::RunValidJsonTestWithValidator( RunTest(effective_test_name, request, &response); + if (response.result_case() == ConformanceResponse::kSkipped) { + ReportSkip(effective_test_name, request, response); + return; + } + if (response.result_case() != ConformanceResponse::kJsonPayload) { ReportFailure(effective_test_name, request, response, "Expected JSON payload but got type %d.", @@ -444,6 +451,8 @@ void ConformanceTestSuite::ExpectParseFailureForJson( RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kParseError) { ReportSuccess(effective_test_name); + } else if (response.result_case() == ConformanceResponse::kSkipped) { + ReportSkip(effective_test_name, request, response); } else { ReportFailure(effective_test_name, request, response, "Should have failed to parse, but didn't."); @@ -466,6 +475,8 @@ void ConformanceTestSuite::ExpectSerializeFailureForJson( RunTest(effective_test_name, request, &response); if (response.result_case() == ConformanceResponse::kSerializeError) { ReportSuccess(effective_test_name); + } else if (response.result_case() == ConformanceResponse::kSkipped) { + ReportSkip(effective_test_name, request, response); } else { ReportFailure(effective_test_name, request, response, "Should have failed to serialize, but didn't."); -- cgit v1.2.3