Explicitly Pass NULL Character in ProvisioningServiceCertificateInvalidTest
Merge from Widevine repo of http://go/wvgerrit/53625 Passing the third parameter to std::string::insert() as an integer technically makes for an ambiguous method call, as there are two overloads that could accept these arguments. While baseline GCC and Clang discern our intent here correctly, seawardt@ discovered that XCode is more pedantic and requires that we pass the third parameter as a char to disambiguate. Test: WvCdmEnginePreProvTestUat.ProvisioningServiceCertificateInvalidTest Test: tested as part of http://go/ag/4674759 Change-Id: I65a2506209215cd081c685faac26e08bae486d5e
This commit is contained in:
@@ -516,7 +516,7 @@ TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateValidTest) {
|
||||
TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateInvalidTest) {
|
||||
std::string certificate = g_provisioning_service_certificate;
|
||||
// Add four nulls to the beginning of the cert to invalidate it
|
||||
certificate.insert(0, 4, 0);
|
||||
certificate.insert(0, 4, '\0');
|
||||
|
||||
ASSERT_NE(cdm_engine_.ValidateServiceCertificate(certificate), NO_ERROR);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user