summaryrefslogtreecommitdiff
path: root/neuralnetworks/utils/common/test/ResilientDeviceTest.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2022-01-21 07:03:32 +0000
committerScott Lobdell <slobdell@google.com>2022-01-21 07:15:05 +0000
commit593bdf5548ac6f13053424a655423c0677e7cb2d (patch)
treeebbbe99553ec26ed9088cf6cfef1aec2e5cc2ef0 /neuralnetworks/utils/common/test/ResilientDeviceTest.cpp
parent78c23e4f5f9e8b61b8bace9a2b4cb691073ef906 (diff)
parenta0f5ebdbd3992e7a78517d13f568d9cbcbb71564 (diff)
Merge TP1A.211206.001
Change-Id: I8b3a43021a3328cf6afb4e7e157339d8e214ddbe
Diffstat (limited to 'neuralnetworks/utils/common/test/ResilientDeviceTest.cpp')
-rw-r--r--neuralnetworks/utils/common/test/ResilientDeviceTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/neuralnetworks/utils/common/test/ResilientDeviceTest.cpp b/neuralnetworks/utils/common/test/ResilientDeviceTest.cpp
index 3abd724c8c..0488b6359b 100644
--- a/neuralnetworks/utils/common/test/ResilientDeviceTest.cpp
+++ b/neuralnetworks/utils/common/test/ResilientDeviceTest.cpp
@@ -28,7 +28,6 @@ namespace android::hardware::neuralnetworks::utils {
namespace {
using ::testing::_;
-using ::testing::InvokeWithoutArgs;
using ::testing::Return;
using SharedMockDevice = std::shared_ptr<const nn::MockDevice>;
@@ -54,7 +53,7 @@ SharedMockDevice createConfiguredMockDevice() {
// Setup default actions for each relevant call.
constexpr auto getName_ret = []() -> const std::string& { return kName; };
constexpr auto getVersionString_ret = []() -> const std::string& { return kVersionString; };
- constexpr auto kFeatureLevel = nn::Version::ANDROID_OC_MR1;
+ constexpr auto kFeatureLevel = nn::kVersionFeatureLevel1;
constexpr auto kDeviceType = nn::DeviceType::ACCELERATOR;
constexpr auto getSupportedExtensions_ret = []() -> const std::vector<nn::Extension>& {
return kExtensions;
@@ -142,7 +141,7 @@ TEST(ResilientDeviceTest, cachedData) {
TEST(ResilientDeviceTest, getFeatureLevel) {
// setup call
const auto [mockDevice, mockDeviceFactory, device] = setup();
- constexpr auto kFeatureLevel = nn::Version::ANDROID_OC_MR1;
+ constexpr auto kFeatureLevel = nn::kVersionFeatureLevel1;
EXPECT_CALL(*mockDevice, getFeatureLevel()).Times(1).WillOnce(Return(kFeatureLevel));
// run test
@@ -592,7 +591,7 @@ TEST(ResilientDeviceTest, recoverCacheMismatchGetFeatureLevel) {
const auto recoveredMockDevice = createConfiguredMockDevice();
EXPECT_CALL(*recoveredMockDevice, getFeatureLevel())
.Times(1)
- .WillOnce(Return(nn::Version::ANDROID_P));
+ .WillOnce(Return(nn::kVersionFeatureLevel2));
EXPECT_CALL(*mockDeviceFactory, Call(false)).Times(1).WillOnce(Return(recoveredMockDevice));
// run test