Use Idiomatic Generators for DeviceFiles Unit Tests

(This is a merge of http://go/wvgerrit/13971)

gTest provides generators for ranges of numbers and booleans so that
we don't have to roll our own.

Change-Id: Id7d9310c5d5c1314f680200da4457c0e529ac107
This commit is contained in:
John "Juce" Bruce
2015-04-07 16:33:27 -07:00
parent 88d9472cfb
commit e0727b8af6

View File

@@ -1356,7 +1356,7 @@ TEST_P(DeviceFilesStoreTest, StoreCertificate) {
} }
INSTANTIATE_TEST_CASE_P(StoreCertificate, DeviceFilesStoreTest, INSTANTIATE_TEST_CASE_P(StoreCertificate, DeviceFilesStoreTest,
::testing::Values(true, false)); ::testing::Bool());
TEST_F(DeviceFilesTest, ReadCertificate) { TEST_F(DeviceFilesTest, ReadCertificate) {
MockFile file; MockFile file;
@@ -1470,8 +1470,7 @@ TEST_P(DeviceFilesStoreTest, StoreLicense) {
license_test_data[license_num].last_playback_time)); license_test_data[license_num].last_playback_time));
} }
INSTANTIATE_TEST_CASE_P(StoreLicense, DeviceFilesStoreTest, INSTANTIATE_TEST_CASE_P(StoreLicense, DeviceFilesStoreTest, ::testing::Bool());
::testing::Values(true, false));
TEST_F(DeviceFilesTest, StoreLicenses) { TEST_F(DeviceFilesTest, StoreLicenses) {
MockFile file; MockFile file;
@@ -1985,6 +1984,6 @@ TEST_P(DeviceFilesUsageInfoTest, DeleteAll) {
} }
INSTANTIATE_TEST_CASE_P(UsageInfo, DeviceFilesUsageInfoTest, INSTANTIATE_TEST_CASE_P(UsageInfo, DeviceFilesUsageInfoTest,
::testing::Values(-1, 0, 1, 2, 3)); ::testing::Range(-1, 4));
} // namespace wvcdm } // namespace wvcdm