Merge "Migrate tests to googletest 1.10+ API"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9d84d5deba
@@ -1133,8 +1133,8 @@ TEST_P(ODKUseCase_LicenseWithRenewal, NullPointerTest) {
|
||||
timer_value_pointer);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(RestrictRenewal, ODKUseCase_LicenseWithRenewal,
|
||||
::testing::Values(0, 1));
|
||||
INSTANTIATE_TEST_SUITE_P(RestrictRenewal, ODKUseCase_LicenseWithRenewal,
|
||||
::testing::Values(0, 1));
|
||||
|
||||
// Limited Duration License. (See above for notes on Use Case tests). The user
|
||||
// has 15 minutes to begin watching the movie. If a renewal is not received,
|
||||
|
||||
@@ -2331,8 +2331,8 @@ TEST_P(OEMCryptoLicenseTestRangeAPI, LoadKeys) {
|
||||
// Range of API versions to test. This should start several versions old, and
|
||||
// go to the current API + 2. We use +2 because we want to test at least 1
|
||||
// future API, and the ::testing::Range is not inclusive.
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoLicenseTestRangeAPI,
|
||||
Range<uint32_t>(10, kCurrentAPI + 2));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoLicenseTestRangeAPI,
|
||||
Range<uint32_t>(10, kCurrentAPI + 2));
|
||||
|
||||
TEST_P(OEMCryptoLicenseTest, LoadKeysBadSignatureAPI16) {
|
||||
ASSERT_NO_FATAL_FAILURE(session_.GenerateNonce());
|
||||
@@ -3407,8 +3407,8 @@ TEST_P(OEMCryptoSessionTestDecryptWithHDCP, DecryptAPI09) {
|
||||
// Test parameterized by HDCP version.
|
||||
DecryptWithHDCP(static_cast<OEMCrypto_HDCP_Capability>(GetParam()));
|
||||
}
|
||||
INSTANTIATE_TEST_CASE_P(TestHDCP, OEMCryptoSessionTestDecryptWithHDCP,
|
||||
Range(1, 6));
|
||||
INSTANTIATE_TEST_SUITE_P(TestHDCP, OEMCryptoSessionTestDecryptWithHDCP,
|
||||
Range(1, 6));
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -3567,12 +3567,12 @@ TEST_P(OEMCryptoRefreshTest, RefreshWithNoSelectKey) {
|
||||
ASSERT_NO_FATAL_FAILURE(session_.TestDecryptCTR(false));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoRefreshTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoRefreshTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
|
||||
// These tests only work when the license has a core message.
|
||||
INSTANTIATE_TEST_CASE_P(TestAPI16, OEMCryptoRefreshTestAPI16,
|
||||
Range<uint32_t>(kCoreMessagesAPI, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAPI16, OEMCryptoRefreshTestAPI16,
|
||||
Range<uint32_t>(kCoreMessagesAPI, kCurrentAPI + 1));
|
||||
|
||||
// If the license does not allow a hash, then we should not compute one.
|
||||
TEST_P(OEMCryptoLicenseTest, HashForbiddenAPI15) {
|
||||
@@ -4369,13 +4369,13 @@ constexpr OEMCrypto_CENCEncryptPatternDesc MakePattern(size_t encrypt,
|
||||
return {encrypt, skip};
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
CTRTests, OEMCryptoSessionTestsDecryptTests,
|
||||
Combine(Values(MakePattern(0, 0)), Values(OEMCrypto_CipherMode_CTR),
|
||||
::testing::ValuesIn(global_features.GetOutputTypes())));
|
||||
|
||||
// Decrypt in place for CBC tests was only required in v13.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
CBCTestsAPI14, OEMCryptoSessionTestsDecryptTests,
|
||||
Combine(
|
||||
Values(MakePattern(3, 7), MakePattern(9, 1),
|
||||
@@ -4419,8 +4419,8 @@ TEST_P(OEMCryptoLicenseTest, KeyDuration) {
|
||||
ASSERT_NO_FATAL_FAILURE(session_.TestSelectExpired(0));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoLicenseTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoLicenseTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
|
||||
//
|
||||
// Certificate Root of Trust Tests
|
||||
@@ -7325,11 +7325,11 @@ TEST_P(OEMCryptoGenericCryptoKeyIdLengthTest, UniformLongKeyId) {
|
||||
TestWithKey(2);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoGenericCryptoTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoGenericCryptoTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoGenericCryptoKeyIdLengthTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoGenericCryptoKeyIdLengthTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -9075,16 +9075,16 @@ TEST_P(OEMCryptoUsageTableTest, PSTLargeBuffer) {
|
||||
ASSERT_NO_FATAL_FAILURE(s.close());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestAll, OEMCryptoUsageTableTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAll, OEMCryptoUsageTableTest,
|
||||
Range<uint32_t>(kCurrentAPI - 1, kCurrentAPI + 1));
|
||||
|
||||
// These tests only work when the license has a core message.
|
||||
INSTANTIATE_TEST_CASE_P(TestAPI16, OEMCryptoUsageTableDefragTest,
|
||||
Values<uint32_t>(kCurrentAPI));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAPI16, OEMCryptoUsageTableDefragTest,
|
||||
Values<uint32_t>(kCurrentAPI));
|
||||
|
||||
// These tests only work when the license has a core message.
|
||||
INSTANTIATE_TEST_CASE_P(TestAPI16, OEMCryptoUsageTableTestWallClock,
|
||||
Values<uint32_t>(kCurrentAPI));
|
||||
INSTANTIATE_TEST_SUITE_P(TestAPI16, OEMCryptoUsageTableTestWallClock,
|
||||
Values<uint32_t>(kCurrentAPI));
|
||||
|
||||
/// @}
|
||||
} // namespace wvoec
|
||||
|
||||
Reference in New Issue
Block a user