Lines Matching refs:mockDevice
51 auto mockDevice = std::make_shared<const nn::MockDevice>(); in createConfiguredMockDevice() local
64 ON_CALL(*mockDevice, getName()).WillByDefault(getName_ret); in createConfiguredMockDevice()
65 ON_CALL(*mockDevice, getVersionString()).WillByDefault(getVersionString_ret); in createConfiguredMockDevice()
66 ON_CALL(*mockDevice, getFeatureLevel()).WillByDefault(Return(kFeatureLevel)); in createConfiguredMockDevice()
67 ON_CALL(*mockDevice, getType()).WillByDefault(Return(kDeviceType)); in createConfiguredMockDevice()
68 ON_CALL(*mockDevice, getSupportedExtensions()).WillByDefault(getSupportedExtensions_ret); in createConfiguredMockDevice()
69 ON_CALL(*mockDevice, getCapabilities()).WillByDefault(getCapabilities_ret); in createConfiguredMockDevice()
70 ON_CALL(*mockDevice, getNumberOfCacheFilesNeeded()) in createConfiguredMockDevice()
75 EXPECT_CALL(*mockDevice, getName()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
76 EXPECT_CALL(*mockDevice, getVersionString()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
77 EXPECT_CALL(*mockDevice, getFeatureLevel()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
78 EXPECT_CALL(*mockDevice, getType()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
79 EXPECT_CALL(*mockDevice, getSupportedExtensions()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
80 EXPECT_CALL(*mockDevice, getCapabilities()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
81 EXPECT_CALL(*mockDevice, getNumberOfCacheFilesNeeded()).Times(testing::AnyNumber()); in createConfiguredMockDevice()
83 return mockDevice; in createConfiguredMockDevice()
89 auto mockDevice = createConfiguredMockDevice(); in setup() local
92 EXPECT_CALL(*mockDeviceFactory, Call(true)).Times(1).WillOnce(Return(mockDevice)); in setup()
95 return std::make_tuple(std::move(mockDevice), std::move(mockDeviceFactory), std::move(device)); in setup()
132 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
143 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
145 EXPECT_CALL(*mockDevice, getFeatureLevel()).Times(1).WillOnce(Return(kFeatureLevel)); in TEST()
156 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
158 EXPECT_CALL(*mockDevice, getType()).Times(1).WillOnce(Return(kDeviceType)); in TEST()
169 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
170 EXPECT_CALL(*mockDevice, getNumberOfCacheFilesNeeded()) in TEST()
183 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
189 EXPECT_TRUE(result == mockDevice); in TEST()
194 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
195 EXPECT_CALL(*mockDevice, wait()).Times(1).WillOnce(Return(nn::GeneralResult<void>{})); in TEST()
207 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
208 EXPECT_CALL(*mockDevice, wait()).Times(1).WillOnce(kReturnGeneralFailure); in TEST()
220 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
221 EXPECT_CALL(*mockDevice, wait()).Times(1).WillOnce(kReturnDeadObject); in TEST()
234 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
235 EXPECT_CALL(*mockDevice, wait()).Times(1).WillOnce(kReturnDeadObject); in TEST()
250 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
251 EXPECT_CALL(*mockDevice, getSupportedOperations(_)) in TEST()
265 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
266 EXPECT_CALL(*mockDevice, getSupportedOperations(_)).Times(1).WillOnce(kReturnGeneralFailure); in TEST()
278 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
279 EXPECT_CALL(*mockDevice, getSupportedOperations(_)).Times(1).WillOnce(kReturnDeadObject); in TEST()
292 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
293 EXPECT_CALL(*mockDevice, getSupportedOperations(_)).Times(1).WillOnce(kReturnDeadObject); in TEST()
310 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
312 EXPECT_CALL(*mockDevice, prepareModel(_, _, _, _, _, _, _, _, _)) in TEST()
326 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
327 EXPECT_CALL(*mockDevice, prepareModel(_, _, _, _, _, _, _, _, _)) in TEST()
341 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
342 EXPECT_CALL(*mockDevice, prepareModel(_, _, _, _, _, _, _, _, _)) in TEST()
357 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
358 EXPECT_CALL(*mockDevice, prepareModel(_, _, _, _, _, _, _, _, _)) in TEST()
378 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
380 EXPECT_CALL(*mockDevice, prepareModelFromCache(_, _, _, _)) in TEST()
394 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
395 EXPECT_CALL(*mockDevice, prepareModelFromCache(_, _, _, _)) in TEST()
409 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
410 EXPECT_CALL(*mockDevice, prepareModelFromCache(_, _, _, _)) in TEST()
425 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
426 EXPECT_CALL(*mockDevice, prepareModelFromCache(_, _, _, _)) in TEST()
446 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
448 EXPECT_CALL(*mockDevice, allocate(_, _, _, _)).Times(1).WillOnce(Return(mockBuffer)); in TEST()
460 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
461 EXPECT_CALL(*mockDevice, allocate(_, _, _, _)).Times(1).WillOnce(kReturnGeneralFailure); in TEST()
473 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
474 EXPECT_CALL(*mockDevice, allocate(_, _, _, _)).Times(1).WillOnce(kReturnDeadObject); in TEST()
487 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
488 EXPECT_CALL(*mockDevice, allocate(_, _, _, _)).Times(1).WillOnce(kReturnDeadObject); in TEST()
504 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
509 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
519 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
524 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
532 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
535 device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
538 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
548 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
556 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
562 EXPECT_TRUE(result.value() != mockDevice); in TEST()
568 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
578 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
584 EXPECT_TRUE(result.value() != mockDevice); in TEST()
590 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
598 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
604 EXPECT_TRUE(result.value() != mockDevice); in TEST()
610 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
616 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
622 EXPECT_TRUE(result.value() != mockDevice); in TEST()
628 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
639 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
645 EXPECT_TRUE(result.value() != mockDevice); in TEST()
651 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
663 const auto result = device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
669 EXPECT_TRUE(result.value() != mockDevice); in TEST()
675 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
679 device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
692 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
696 device->recover(mockDevice.get(), /*blocking=*/false); in TEST()
709 const auto [mockDevice, mockDeviceFactory, device] = setup(); in TEST()
713 device->recover(mockDevice.get(), /*blocking=*/false); in TEST()