Change some test EXPECT to ASSERT to avoid segfaults
Merge from Widevine repo of http://go/wvgerrit/94505 Some tests use an EXPECT when checking an array size or to verify a pointer is not null. Then they access the pointer or array. When they use an EXPECT, this access results in a segfault. I also removed a compiler warning about unused parameters. Bug: 149856581 Test: request_license_test (now lists failed tests) Change-Id: I08ac11250921245c89ed5c0c43cc5f4321e0a9cc
This commit is contained in:
@@ -437,7 +437,7 @@ class MockCryptoSession : public TestCryptoSession {
|
||||
|
||||
// Fake method for testing. Having an EXPECT_CALL causes complexities
|
||||
// for getting table capacity during initialization.
|
||||
virtual bool GetMaximumUsageTableEntries(SecurityLevel security_level,
|
||||
virtual bool GetMaximumUsageTableEntries(SecurityLevel /*security_level*/,
|
||||
size_t* number_of_entries) {
|
||||
if (number_of_entries == nullptr || !maximum_usage_table_entries_set_)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user