Commit 3df5a6ba authored by Kevin Jacobs's avatar Kevin Jacobs

Bug 1677207 - Replace references to TestCase, which is deprecated, with TestSuite r=bbeurdouche

grep -rl --exclude-dir=google_test INSTANTIATE_TEST_CASE_P gtests | xargs sed -i '' s/INSTANTIATE_TEST_CASE_P/INSTANTIATE_TEST_SUITE_P/g
grep -rl --exclude-dir=google_test SetUpTestCase gtests | xargs sed -i '' s/SetUpTestCase/SetUpTestSuite/g

Differential Revision: https://phabricator.services.mozilla.com/D98818

--HG--
extra : moz-landing-system : lando
parent 9ee92079
......@@ -86,10 +86,10 @@ TEST_P(Alg1485CompareTest, CompareAVAStrings) {
EXPECT_EQ(param.expectedResult, CERT_CompareName(a.get(), b.get()));
}
INSTANTIATE_TEST_CASE_P(ParseAVAStrings, Alg1485ParseTest,
::testing::ValuesIn(kAVATestStrings));
INSTANTIATE_TEST_CASE_P(CompareAVAStrings, Alg1485CompareTest,
::testing::ValuesIn(kAVACompareStrings));
INSTANTIATE_TEST_SUITE_P(ParseAVAStrings, Alg1485ParseTest,
::testing::ValuesIn(kAVATestStrings));
INSTANTIATE_TEST_SUITE_P(CompareAVAStrings, Alg1485CompareTest,
::testing::ValuesIn(kAVACompareStrings));
TEST_F(Alg1485Test, ShortOIDTest) {
// This is not a valid OID (too short). CERT_GetOidString should return 0.
......
......@@ -356,7 +356,7 @@ TEST_P(SignParamsSourceTest, CreateRsaPssWithHashMismatch) {
EXPECT_EQ(nullptr, params);
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
SignParamsTestCases, SignParamsTest,
::testing::Combine(::testing::Values(SEC_OID_UNKNOWN, SEC_OID_SHA1,
SEC_OID_SHA224, SEC_OID_SHA256,
......@@ -365,9 +365,9 @@ INSTANTIATE_TEST_CASE_P(
SEC_OID_SHA224, SEC_OID_SHA256,
SEC_OID_SHA384, SEC_OID_SHA512)));
INSTANTIATE_TEST_CASE_P(SignParamsSourceTestCases, SignParamsSourceTest,
::testing::Values(SEC_OID_UNKNOWN, SEC_OID_SHA1,
SEC_OID_SHA224, SEC_OID_SHA256,
SEC_OID_SHA384, SEC_OID_SHA512));
INSTANTIATE_TEST_SUITE_P(SignParamsSourceTestCases, SignParamsSourceTest,
::testing::Values(SEC_OID_UNKNOWN, SEC_OID_SHA1,
SEC_OID_SHA224, SEC_OID_SHA256,
SEC_OID_SHA384, SEC_OID_SHA512));
} // namespace nss_test
......@@ -103,7 +103,7 @@ TEST_P(QuickDERTest, InvalidLengths) {
PORT_DestroyCheapArena(&pool);
}
INSTANTIATE_TEST_CASE_P(QuickderTestsInvalidLengths, QuickDERTest,
testing::ValuesIn(kInvalidDER));
INSTANTIATE_TEST_SUITE_P(QuickderTestsInvalidLengths, QuickDERTest,
testing::ValuesIn(kInvalidDER));
} // namespace nss_test
......@@ -56,10 +56,10 @@ TEST_P(Blake2BKATKeyed, Keyed) {
EXPECT_EQ(values, std::get<1>(GetParam()));
}
INSTANTIATE_TEST_CASE_P(UnkeyedKAT, Blake2BKATUnkeyed,
::testing::ValuesIn(TestcasesUnkeyed));
INSTANTIATE_TEST_CASE_P(KeyedKAT, Blake2BKATKeyed,
::testing::ValuesIn(TestcasesKeyed));
INSTANTIATE_TEST_SUITE_P(UnkeyedKAT, Blake2BKATUnkeyed,
::testing::ValuesIn(TestcasesUnkeyed));
INSTANTIATE_TEST_SUITE_P(KeyedKAT, Blake2BKATKeyed,
::testing::ValuesIn(TestcasesKeyed));
TEST_F(Blake2BTests, ContextTest) {
ScopedBLAKE2BContext ctx(BLAKE2B_NewContext());
......
......@@ -49,7 +49,7 @@ TEST_P(GHashTest, KAT_X86_HW) { TestGHash(GetParam(), false); }
#endif
TEST_P(GHashTest, KAT_Sftw) { TestGHash(GetParam(), true); }
INSTANTIATE_TEST_CASE_P(NISTTestVector, GHashTest,
::testing::ValuesIn(kGcmKatValues));
INSTANTIATE_TEST_SUITE_P(NISTTestVector, GHashTest,
::testing::ValuesIn(kGcmKatValues));
} // nss_test
......@@ -158,8 +158,8 @@ class PRNGTest : public ::testing::TestWithParam<PRNGTestValues> {
TEST_P(PRNGTest, HashDRBG) { RunTest(GetParam()); }
INSTANTIATE_TEST_CASE_P(NISTTestVector, PRNGTest,
::testing::ValuesIn(test_vector));
INSTANTIATE_TEST_SUITE_P(NISTTestVector, PRNGTest,
::testing::ValuesIn(test_vector));
} // nss_test
......
......@@ -173,7 +173,7 @@ private:
class pkixbuild : public ::testing::Test
{
public:
static void SetUpTestCase()
static void SetUpTestSuite()
{
if (!trustDomain.SetUpCertChainTail()) {
abort();
......@@ -521,7 +521,7 @@ TEST_P(pkixbuild_IssuerNameCheck, MatchingName)
nullptr/*stapledOCSPResponse*/));
}
INSTANTIATE_TEST_CASE_P(pkixbuild_IssuerNameCheck, pkixbuild_IssuerNameCheck,
INSTANTIATE_TEST_SUITE_P(pkixbuild_IssuerNameCheck, pkixbuild_IssuerNameCheck,
testing::ValuesIn(ISSUER_NAME_CHECK_PARAMS));
......
......@@ -244,7 +244,7 @@ TEST_P(pkixcert_extension, ExtensionHandledProperly)
nullptr/*stapledOCSPResponse*/));
}
INSTANTIATE_TEST_CASE_P(pkixcert_extension,
INSTANTIATE_TEST_SUITE_P(pkixcert_extension,
pkixcert_extension,
testing::ValuesIn(EXTENSION_TESTCASES));
......
......@@ -304,6 +304,6 @@ TEST_P(pkixcert_IsValidChainForAlgorithm, IsValidChainForAlgorithm)
CertPolicyId::anyPolicy, nullptr));
}
INSTANTIATE_TEST_CASE_P(pkixcert_IsValidChainForAlgorithm,
INSTANTIATE_TEST_SUITE_P(pkixcert_IsValidChainForAlgorithm,
pkixcert_IsValidChainForAlgorithm,
testing::ValuesIn(CHAIN_VALIDITY));
......@@ -474,7 +474,7 @@ static const EKUTestcase EKU_TESTCASES[] =
DOUBLE_EKU_FAILURE(tlv_unknownOID, tlv_anyExtendedKeyUsage, KeyPurposeId::id_kp_OCSPSigning),
};
INSTANTIATE_TEST_CASE_P(pkixcheck_CheckExtendedKeyUsage,
INSTANTIATE_TEST_SUITE_P(pkixcheck_CheckExtendedKeyUsage,
CheckExtendedKeyUsageTest,
::testing::ValuesIn(EKU_TESTCASES));
......@@ -717,6 +717,6 @@ static const EKUChainTestcase EKU_CHAIN_TESTCASES[] =
},
};
INSTANTIATE_TEST_CASE_P(pkixcheck_CheckExtendedKeyUsage,
INSTANTIATE_TEST_SUITE_P(pkixcheck_CheckExtendedKeyUsage,
CheckExtendedKeyUsageChainTest,
::testing::ValuesIn(EKU_CHAIN_TESTCASES));
......@@ -265,7 +265,7 @@ TEST_P(pkixcheck_CheckSignatureAlgorithm, CheckSignatureAlgorithm)
trustDomain.checkedModulusSizeInBits);
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
pkixcheck_CheckSignatureAlgorithm, pkixcheck_CheckSignatureAlgorithm,
testing::ValuesIn(CHECKSIGNATUREALGORITHM_TEST_PARAMS));
......
......@@ -114,7 +114,7 @@ TEST_P(pkixcheck_TLSFeaturesSatisfiedInternal, TLSFeaturesSatisfiedInternal) {
TLSFeaturesSatisfiedInternal(&featuresInput, &responseInput));
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
pkixcheck_TLSFeaturesSatisfiedInternal,
pkixcheck_TLSFeaturesSatisfiedInternal,
testing::ValuesIn(TLSFEATURESSATISFIED_TEST_PARAMS));
......@@ -265,7 +265,7 @@ TEST_P(pkixder_DigestAlgorithmIdentifier_Valid, Valid)
}
}
INSTANTIATE_TEST_CASE_P(pkixder_DigestAlgorithmIdentifier_Valid,
INSTANTIATE_TEST_SUITE_P(pkixder_DigestAlgorithmIdentifier_Valid,
pkixder_DigestAlgorithmIdentifier_Valid,
testing::ValuesIn(VALID_DIGEST_ALGORITHM_TEST_INFO));
......@@ -301,7 +301,7 @@ TEST_P(pkixder_DigestAlgorithmIdentifier_Invalid, Invalid)
DigestAlgorithmIdentifier(reader, alg));
}
INSTANTIATE_TEST_CASE_P(pkixder_DigestAlgorithmIdentifier_Invalid,
INSTANTIATE_TEST_SUITE_P(pkixder_DigestAlgorithmIdentifier_Invalid,
pkixder_DigestAlgorithmIdentifier_Invalid,
testing::ValuesIn(INVALID_DIGEST_ALGORITHM_TEST_INFO));
......@@ -422,7 +422,7 @@ TEST_P(pkixder_SignatureAlgorithmIdentifierValue_Valid, Valid)
}
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
pkixder_SignatureAlgorithmIdentifierValue_Valid,
pkixder_SignatureAlgorithmIdentifierValue_Valid,
testing::ValuesIn(VALID_SIGNATURE_ALGORITHM_VALUE_TEST_INFO));
......@@ -474,7 +474,7 @@ TEST_P(pkixder_SignatureAlgorithmIdentifier_Invalid, Invalid)
SignatureAlgorithmIdentifierValue(reader, publicKeyAlg, digestAlg));
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
pkixder_SignatureAlgorithmIdentifier_Invalid,
pkixder_SignatureAlgorithmIdentifier_Invalid,
testing::ValuesIn(INVALID_SIGNATURE_ALGORITHM_VALUE_TEST_INFO));
......@@ -1126,7 +1126,7 @@ TEST_P(pkixder_universal_types_tests_Integer,
#undef INVALID
INSTANTIATE_TEST_CASE_P(pkixder_universal_types_tests_Integer,
INSTANTIATE_TEST_SUITE_P(pkixder_universal_types_tests_Integer,
pkixder_universal_types_tests_Integer,
testing::ValuesIn(INTEGER_TEST_PARAMS));
......
......@@ -948,7 +948,7 @@ TEST_P(pkixnames_MatchPresentedDNSIDWithReferenceDNSID,
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_MatchPresentedDNSIDWithReferenceDNSID,
INSTANTIATE_TEST_SUITE_P(pkixnames_MatchPresentedDNSIDWithReferenceDNSID,
pkixnames_MatchPresentedDNSIDWithReferenceDNSID,
testing::ValuesIn(DNSID_MATCH_PARAMS));
......@@ -995,7 +995,7 @@ TEST_P(pkixnames_Turkish_I_Comparison, MatchPresentedDNSIDWithReferenceDNSID)
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_Turkish_I_Comparison,
INSTANTIATE_TEST_SUITE_P(pkixnames_Turkish_I_Comparison,
pkixnames_Turkish_I_Comparison,
testing::ValuesIn(DNSNAMES_VALIDITY_TURKISH_I));
......@@ -1018,10 +1018,10 @@ TEST_P(pkixnames_IsValidReferenceDNSID, IsValidReferenceDNSID)
ASSERT_EQ(inputValidity.isValidPresentedID, IsValidPresentedDNSID(input));
}
INSTANTIATE_TEST_CASE_P(pkixnames_IsValidReferenceDNSID,
INSTANTIATE_TEST_SUITE_P(pkixnames_IsValidReferenceDNSID,
pkixnames_IsValidReferenceDNSID,
testing::ValuesIn(DNSNAMES_VALIDITY));
INSTANTIATE_TEST_CASE_P(pkixnames_IsValidReferenceDNSID_Turkish_I,
INSTANTIATE_TEST_SUITE_P(pkixnames_IsValidReferenceDNSID_Turkish_I,
pkixnames_IsValidReferenceDNSID,
testing::ValuesIn(DNSNAMES_VALIDITY_TURKISH_I));
......@@ -1049,7 +1049,7 @@ TEST_P(pkixnames_ParseIPv4Address, ParseIPv4Address)
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_ParseIPv4Address,
INSTANTIATE_TEST_SUITE_P(pkixnames_ParseIPv4Address,
pkixnames_ParseIPv4Address,
testing::ValuesIn(IPV4_ADDRESSES));
......@@ -1077,7 +1077,7 @@ TEST_P(pkixnames_ParseIPv6Address, ParseIPv6Address)
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_ParseIPv6Address,
INSTANTIATE_TEST_SUITE_P(pkixnames_ParseIPv6Address,
pkixnames_ParseIPv6Address,
testing::ValuesIn(IPV6_ADDRESSES));
......@@ -1616,7 +1616,7 @@ TEST_P(pkixnames_CheckCertHostname, CheckCertHostname)
mNameMatchingPolicy));
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckCertHostname,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckCertHostname,
pkixnames_CheckCertHostname,
testing::ValuesIn(CHECK_CERT_HOSTNAME_PARAMS));
......@@ -1701,7 +1701,7 @@ TEST_P(pkixnames_CheckCertHostname_PresentedMatchesReference,
mNameMatchingPolicy));
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckCertHostname_DNSID_MATCH_PARAMS,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckCertHostname_DNSID_MATCH_PARAMS,
pkixnames_CheckCertHostname_PresentedMatchesReference,
testing::ValuesIn(DNSID_MATCH_PARAMS));
......@@ -1820,7 +1820,7 @@ TEST_P(pkixnames_CheckCertHostname_IPV4_Addresses,
mNameMatchingPolicy));
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckCertHostname_IPV4_ADDRESSES,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckCertHostname_IPV4_ADDRESSES,
pkixnames_CheckCertHostname_IPV4_Addresses,
testing::ValuesIn(IPV4_ADDRESSES));
......@@ -2680,7 +2680,7 @@ TEST_P(pkixnames_CheckNameConstraints,
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckNameConstraints,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckNameConstraints,
pkixnames_CheckNameConstraints,
testing::ValuesIn(NAME_CONSTRAINT_PARAMS));
......@@ -2772,7 +2772,7 @@ TEST_P(pkixnames_CheckNameConstraintsOnIntermediate,
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckNameConstraintsOnIntermediate,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckNameConstraintsOnIntermediate,
pkixnames_CheckNameConstraintsOnIntermediate,
testing::ValuesIn(NO_FALLBACK_NAME_CONSTRAINT_PARAMS));
......@@ -2833,6 +2833,6 @@ TEST_P(pkixnames_CheckNameConstraintsForNonServerAuthUsage,
}
}
INSTANTIATE_TEST_CASE_P(pkixnames_CheckNameConstraintsForNonServerAuthUsage,
INSTANTIATE_TEST_SUITE_P(pkixnames_CheckNameConstraintsForNonServerAuthUsage,
pkixnames_CheckNameConstraintsForNonServerAuthUsage,
testing::ValuesIn(NO_FALLBACK_NAME_CONSTRAINT_PARAMS));
......@@ -69,7 +69,7 @@ char const* const rootName = "Test CA 1";
class pkixocsp_VerifyEncodedResponse : public ::testing::Test
{
public:
static void SetUpTestCase()
static void SetUpTestSuite()
{
rootKeyPair.reset(GenerateKeyPair());
if (!rootKeyPair) {
......@@ -179,7 +179,7 @@ TEST_P(pkixocsp_VerifyEncodedResponse_WithoutResponseBytes, CorrectErrorCode)
response, expired));
}
INSTANTIATE_TEST_CASE_P(pkixocsp_VerifyEncodedResponse_WithoutResponseBytes,
INSTANTIATE_TEST_SUITE_P(pkixocsp_VerifyEncodedResponse_WithoutResponseBytes,
pkixocsp_VerifyEncodedResponse_WithoutResponseBytes,
testing::ValuesIn(WITHOUT_RESPONSEBYTES));
......@@ -202,9 +202,9 @@ public:
pkixocsp_VerifyEncodedResponse::SetUp();
}
static void SetUpTestCase()
static void SetUpTestSuite()
{
pkixocsp_VerifyEncodedResponse::SetUpTestCase();
pkixocsp_VerifyEncodedResponse::SetUpTestSuite();
}
ByteString CreateEncodedOCSPSuccessfulResponse(
......
......@@ -92,8 +92,8 @@ class Pkcs11AesCmacTest : public ::testing::TestWithParam<AesCmacTestVector> {
TEST_P(Pkcs11AesCmacTest, TestVectors) { RunTestVector(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofTestVector, Pkcs11AesCmacTest,
::testing::ValuesIn(kCmacWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofTestVector, Pkcs11AesCmacTest,
::testing::ValuesIn(kCmacWycheproofVectors));
// Sanity check of the PKCS #11 API only. Extensive tests for correctness of
// underling CMAC implementation conducted in the following file:
......
......@@ -351,11 +351,11 @@ class Pkcs11AesGcmTest : public ::testing::TestWithParam<AesGcmKatValue> {
TEST_P(Pkcs11AesGcmTest, TestVectors) { RunTest(GetParam()); }
INSTANTIATE_TEST_CASE_P(NISTTestVector, Pkcs11AesGcmTest,
::testing::ValuesIn(kGcmKatValues));
INSTANTIATE_TEST_SUITE_P(NISTTestVector, Pkcs11AesGcmTest,
::testing::ValuesIn(kGcmKatValues));
INSTANTIATE_TEST_CASE_P(WycheproofTestVector, Pkcs11AesGcmTest,
::testing::ValuesIn(kGcmWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofTestVector, Pkcs11AesGcmTest,
::testing::ValuesIn(kGcmWycheproofVectors));
TEST_F(Pkcs11AesGcmTest, ZeroLengthIV) {
std::vector<uint8_t> iv(0);
......
......@@ -117,6 +117,6 @@ class Pkcs11AESKeyWrapTest : public ::testing::TestWithParam<keywrap_vector> {
TEST_P(Pkcs11AESKeyWrapTest, TestVectors) { WrapUnwrap(GetParam()); }
INSTANTIATE_TEST_CASE_P(Pkcs11WycheproofAESKWTest, Pkcs11AESKeyWrapTest,
::testing::ValuesIn(kWycheproofAesKWVectors));
INSTANTIATE_TEST_SUITE_P(Pkcs11WycheproofAESKWTest, Pkcs11AESKeyWrapTest,
::testing::ValuesIn(kWycheproofAesKWVectors));
} /* nss_test */
......@@ -118,6 +118,6 @@ class Pkcs11AESKeyWrapKwpTest
TEST_P(Pkcs11AESKeyWrapKwpTest, TestVectors) { WrapUnwrap(GetParam()); }
INSTANTIATE_TEST_CASE_P(Pkcs11NistAESKWPTest, Pkcs11AESKeyWrapKwpTest,
::testing::ValuesIn(kNistAesKWPVectors));
INSTANTIATE_TEST_SUITE_P(Pkcs11NistAESKWPTest, Pkcs11AESKeyWrapKwpTest,
::testing::ValuesIn(kNistAesKWPVectors));
} /* nss_test */
......@@ -553,9 +553,9 @@ TEST_P(Pkcs11CbcPadTest, EncryptDecrypt_ShortValidPadding) {
EXPECT_EQ(0, memcmp(decrypted.data(), input.data(), decrypted_len));
}
INSTANTIATE_TEST_CASE_P(EncryptDecrypt, Pkcs11CbcPadTest,
::testing::Values(CKM_AES_CBC_PAD, CKM_AES_CBC,
CKM_DES3_CBC_PAD, CKM_DES3_CBC));
INSTANTIATE_TEST_SUITE_P(EncryptDecrypt, Pkcs11CbcPadTest,
::testing::Values(CKM_AES_CBC_PAD, CKM_AES_CBC,
CKM_DES3_CBC_PAD, CKM_DES3_CBC));
class Pkcs11AesCbcWycheproofTest
: public ::testing::TestWithParam<AesCbcTestVector> {
......@@ -602,7 +602,7 @@ class Pkcs11AesCbcWycheproofTest
TEST_P(Pkcs11AesCbcWycheproofTest, TestVectors) { RunTest(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofTestVector, Pkcs11AesCbcWycheproofTest,
::testing::ValuesIn(kCbcWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofTestVector, Pkcs11AesCbcWycheproofTest,
::testing::ValuesIn(kCbcWycheproofVectors));
} // namespace nss_test
......@@ -469,11 +469,11 @@ TEST_F(Pkcs11ChaCha20Poly1305Test, XorInvalidParams) {
TEST_P(Pkcs11ChaCha20Poly1305Test, TestVectors) { EncryptDecrypt(GetParam()); }
INSTANTIATE_TEST_CASE_P(NSSTestVector, Pkcs11ChaCha20Poly1305Test,
::testing::ValuesIn(kChaCha20Vectors));
INSTANTIATE_TEST_SUITE_P(NSSTestVector, Pkcs11ChaCha20Poly1305Test,
::testing::ValuesIn(kChaCha20Vectors));
INSTANTIATE_TEST_CASE_P(WycheproofTestVector, Pkcs11ChaCha20Poly1305Test,
::testing::ValuesIn(kChaCha20WycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofTestVector, Pkcs11ChaCha20Poly1305Test,
::testing::ValuesIn(kChaCha20WycheproofVectors));
// basic message interface it's the most common configuration
TEST_F(Pkcs11ChaCha20Poly1305Test, ChaCha201305MessageInterfaceBasic) {
......
......@@ -117,10 +117,10 @@ class Pkcs11Curve25519Test
TEST_P(Pkcs11Curve25519Test, TestVectors) { Derive(GetParam()); }
INSTANTIATE_TEST_CASE_P(NSSTestVector, Pkcs11Curve25519Test,
::testing::ValuesIn(kCurve25519Vectors));
INSTANTIATE_TEST_SUITE_P(NSSTestVector, Pkcs11Curve25519Test,
::testing::ValuesIn(kCurve25519Vectors));
INSTANTIATE_TEST_CASE_P(WycheproofTestVector, Pkcs11Curve25519Test,
::testing::ValuesIn(kCurve25519WycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofTestVector, Pkcs11Curve25519Test,
::testing::ValuesIn(kCurve25519WycheproofVectors));
} // namespace nss_test
......@@ -73,7 +73,7 @@ class Pkcs11DsaTest : public ::testing::TestWithParam<DsaTestVector> {
TEST_P(Pkcs11DsaTest, WycheproofVectors) { Derive(GetParam()); }
INSTANTIATE_TEST_CASE_P(DsaTest, Pkcs11DsaTest,
::testing::ValuesIn(kDsaWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(DsaTest, Pkcs11DsaTest,
::testing::ValuesIn(kDsaWycheproofVectors));
} // namespace nss_test
......@@ -76,11 +76,11 @@ class Pkcs11EcdhTest : public ::testing::TestWithParam<EcdhTestVector> {
TEST_P(Pkcs11EcdhTest, TestVectors) { Derive(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofP256EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP256EcdhWycheproofVectors));
INSTANTIATE_TEST_CASE_P(WycheproofP384EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP384EcdhWycheproofVectors));
INSTANTIATE_TEST_CASE_P(WycheproofP521EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP521EcdhWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP256EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP256EcdhWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP384EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP384EcdhWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP521EcdhTest, Pkcs11EcdhTest,
::testing::ValuesIn(kP521EcdhWycheproofVectors));
} // namespace nss_test
......@@ -65,8 +65,8 @@ static const Pkcs11EcdsaTestParams kEcdsaVectors[] = {
DataBuffer(kP521Data, sizeof(kP521Data)),
DataBuffer(kP521Signature, sizeof(kP521Signature))}}};
INSTANTIATE_TEST_CASE_P(EcdsaSignVerify, Pkcs11EcdsaTest,
::testing::ValuesIn(kEcdsaVectors));
INSTANTIATE_TEST_SUITE_P(EcdsaSignVerify, Pkcs11EcdsaTest,
::testing::ValuesIn(kEcdsaVectors));
class Pkcs11EcdsaSha256Test : public Pkcs11EcdsaTestBase {
public:
......@@ -208,16 +208,16 @@ class Pkcs11EcdsaWycheproofTest
TEST_P(Pkcs11EcdsaWycheproofTest, Verify) { Derive(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofP256SignatureSha256Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP256EcdsaSha256Vectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP256SignatureSha256Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP256EcdsaSha256Vectors));
INSTANTIATE_TEST_CASE_P(WycheproofP384SignatureSha384Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP384EcdsaSha384Vectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP384SignatureSha384Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP384EcdsaSha384Vectors));
INSTANTIATE_TEST_CASE_P(WycheproofP521SignatureSha512Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP521EcdsaSha512Vectors));
INSTANTIATE_TEST_SUITE_P(WycheproofP521SignatureSha512Test,
Pkcs11EcdsaWycheproofTest,
::testing::ValuesIn(kP521EcdsaSha512Vectors));
} // namespace nss_test
......@@ -204,8 +204,8 @@ static const CK_MECHANISM_TYPE kEncryptDeriveMechanisms[] = {
#endif
};
INSTANTIATE_TEST_CASE_P(EncryptDeriveTests, EncryptDeriveTest,
::testing::ValuesIn(kEncryptDeriveMechanisms));
INSTANTIATE_TEST_SUITE_P(EncryptDeriveTests, EncryptDeriveTest,
::testing::ValuesIn(kEncryptDeriveMechanisms));
// This class handles the case where 3DES takes a 192-bit key
// where all 24 octets will be used.
......@@ -219,7 +219,7 @@ TEST_P(EncryptDerive3Test, Test) { TestEncryptDerive(); }
static const CK_MECHANISM_TYPE kDES3EncryptDeriveMechanisms[] = {CKM_DES3_ECB,
CKM_DES3_CBC};
INSTANTIATE_TEST_CASE_P(Encrypt3DeriveTests, EncryptDerive3Test,
::testing::ValuesIn(kDES3EncryptDeriveMechanisms));
INSTANTIATE_TEST_SUITE_P(Encrypt3DeriveTests, EncryptDerive3Test,
::testing::ValuesIn(kDES3EncryptDeriveMechanisms));
} // namespace nss_test
......@@ -173,25 +173,25 @@ TEST_P(Pkcs11HkdfTest, WycheproofVectors) {
std::get<2>(GetParam()));
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HkdfSha1, Pkcs11HkdfTest,
::testing::Combine(::testing::ValuesIn(kHkdfSha1WycheproofVectors),
::testing::ValuesIn(kHkdfTestTypesAll),
::testing::Values(CKM_SHA_1)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HkdfSha256, Pkcs11HkdfTest,
::testing::Combine(::testing::ValuesIn(kHkdfSha256WycheproofVectors),
::testing::ValuesIn(kHkdfTestTypesAll),
::testing::Values(CKM_SHA256)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HkdfSha384, Pkcs11HkdfTest,
::testing::Combine(::testing::ValuesIn(kHkdfSha384WycheproofVectors),
::testing::ValuesIn(kHkdfTestTypesAll),
::testing::Values(CKM_SHA384)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HkdfSha512, Pkcs11HkdfTest,
::testing::Combine(::testing::ValuesIn(kHkdfSha512WycheproofVectors),
::testing::ValuesIn(kHkdfTestTypesAll),
......
......@@ -59,15 +59,15 @@ TEST_P(Pkcs11HmacTest, WycheproofVectors) {
RunTestVector(std::get<0>(GetParam()), std::get<1>(GetParam()));
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HmacSha256, Pkcs11HmacTest,
::testing::Combine(::testing::ValuesIn(kHmacSha256WycheproofVectors),
::testing::Values(CKM_SHA256_HMAC)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HmacSha384, Pkcs11HmacTest,
::testing::Combine(::testing::ValuesIn(kHmacSha384WycheproofVectors),
::testing::Values(CKM_SHA384_HMAC)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
HmacSha512, Pkcs11HmacTest,
::testing::Combine(::testing::ValuesIn(kHmacSha512WycheproofVectors),
::testing::Values(CKM_SHA512_HMAC)));
......
......@@ -309,8 +309,8 @@ class Pkcs11HpkeTest : public ::testing::TestWithParam<hpke_vector> {
TEST_P(Pkcs11HpkeTest, TestVectors) { RunTestVector(GetParam()); }
INSTANTIATE_TEST_CASE_P(Pkcs11HpkeTests, Pkcs11HpkeTest,
::testing::ValuesIn(kHpkeTestVectors));
INSTANTIATE_TEST_SUITE_P(Pkcs11HpkeTests, Pkcs11HpkeTest,
::testing::ValuesIn(kHpkeTestVectors));
TEST_F(Pkcs11HpkeTest, BadEncapsulatedPubKey) {
ScopedHpkeContext sender(
......
......@@ -256,10 +256,10 @@ TEST_P(Pk11KeyImportTest, GenerateExportImport) {
Test(Pkcs11KeyPairGenerator(GetParam()));
}
INSTANTIATE_TEST_CASE_P(Pk11KeyImportTest, Pk11KeyImportTest,
::testing::Values(CKM_RSA_PKCS_KEY_PAIR_GEN,
CKM_DSA_KEY_PAIR_GEN,
CKM_DH_PKCS_KEY_PAIR_GEN));
INSTANTIATE_TEST_SUITE_P(Pk11KeyImportTest, Pk11KeyImportTest,
::testing::Values(CKM_RSA_PKCS_KEY_PAIR_GEN,
CKM_DSA_KEY_PAIR_GEN,
CKM_DH_PKCS_KEY_PAIR_GEN));
class Pk11KeyImportTestEC : public Pk11KeyImportTestBase,
public ::testing::WithParamInterface<SECOidTag> {
......@@ -272,10 +272,10 @@ TEST_P(Pk11KeyImportTestEC, GenerateExportImport) {
Test(Pkcs11KeyPairGenerator(CKM_EC_KEY_PAIR_GEN, GetParam()));
}
INSTANTIATE_TEST_CASE_P(Pk11KeyImportTestEC, Pk11KeyImportTestEC,
::testing::Values(SEC_OID_SECG_EC_SECP256R1,
SEC_OID_SECG_EC_SECP384R1,
SEC_OID_SECG_EC_SECP521R1,
SEC_OID_CURVE25519));
INSTANTIATE_TEST_SUITE_P(Pk11KeyImportTestEC, Pk11KeyImportTestEC,
::testing::Values(SEC_OID_SECG_EC_SECP256R1,
SEC_OID_SECG_EC_SECP384R1,
SEC_OID_SECG_EC_SECP521R1,
SEC_OID_CURVE25519));
} // namespace nss_test
......@@ -71,10 +71,10 @@ TEST_P(Pkcs11EcdhNullKeyTest, UseNullPublicValue) {
Test(Pkcs11KeyPairGenerator(CKM_EC_KEY_PAIR_GEN, GetParam()),
CKM_ECDH1_DERIVE);
}
INSTANTIATE_TEST_CASE_P(Pkcs11EcdhNullKeyTest, Pkcs11EcdhNullKeyTest,
::testing::Values(SEC_OID_SECG_EC_SECP256R1,
SEC_OID_SECG_EC_SECP384R1,
SEC_OID_SECG_EC_SECP521R1,
SEC_OID_CURVE25519));
INSTANTIATE_TEST_SUITE_P(Pkcs11EcdhNullKeyTest, Pkcs11EcdhNullKeyTest,
::testing::Values(SEC_OID_SECG_EC_SECP256R1,
SEC_OID_SECG_EC_SECP384R1,
SEC_OID_SECG_EC_SECP521R1,
SEC_OID_CURVE25519));
} // namespace nss_test
......@@ -57,14 +57,14 @@ class RsaDecryptWycheproofTest
TEST_P(RsaDecryptWycheproofTest, Pkcs1Decrypt) { TestDecrypt(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofRsa2048DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa2048DecryptWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofRsa2048DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa2048DecryptWycheproofVectors));
INSTANTIATE_TEST_CASE_P(WycheproofRsa3072DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa3072DecryptWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofRsa3072DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa3072DecryptWycheproofVectors));
INSTANTIATE_TEST_CASE_P(WycheproofRsa4096DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa4096DecryptWycheproofVectors));
INSTANTIATE_TEST_SUITE_P(WycheproofRsa4096DecryptTest, RsaDecryptWycheproofTest,
::testing::ValuesIn(kRsa4096DecryptWycheproofVectors));
TEST(RsaEncryptTest, MessageLengths) {
const uint8_t spki[] = {
......
......@@ -90,30 +90,31 @@ class RsaOaepWycheproofTest
TEST_P(RsaOaepWycheproofTest, OaepDecrypt) { TestDecrypt(GetParam()); }
INSTANTIATE_TEST_CASE_P(WycheproofRsa2048Sha1OaepTest, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha1WycheproofVectors));
INSTANTIATE_TEST_SUITE_P(
WycheproofRsa2048Sha1OaepTest, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha1WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
WycheproofOaep2048Sha256Sha1Test, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha256Mgf1Sha1WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
WycheproofOaep2048Sha256Sha256Test, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha256Mgf1Sha256WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
WycheproofOaep2048Sha384Sha1Test, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha384Mgf1Sha1WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
WycheproofOaep2048Sha384Sha384Test, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha384Mgf1Sha384WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
WycheproofOaep2048Sha512Sha1Test, RsaOaepWycheproofTest,
::testing::ValuesIn(kRsaOaep2048Sha512Mgf1Sha1WycheproofVectors));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUIT