summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/utils/test/DeviceTest.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/aidl/utils/test/DeviceTest.cpp
parent78c23e4f5f9e8b61b8bace9a2b4cb691073ef906 (diff)
parenta0f5ebdbd3992e7a78517d13f568d9cbcbb71564 (diff)
Merge TP1A.211206.001
Change-Id: I8b3a43021a3328cf6afb4e7e157339d8e214ddbe
Diffstat (limited to 'neuralnetworks/aidl/utils/test/DeviceTest.cpp')
-rw-r--r--neuralnetworks/aidl/utils/test/DeviceTest.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/neuralnetworks/aidl/utils/test/DeviceTest.cpp b/neuralnetworks/aidl/utils/test/DeviceTest.cpp
index 79abe1b19b..0366e7dff0 100644
--- a/neuralnetworks/aidl/utils/test/DeviceTest.cpp
+++ b/neuralnetworks/aidl/utils/test/DeviceTest.cpp
@@ -152,13 +152,17 @@ class DeviceTest : public ::testing::TestWithParam<nn::Version> {
};
std::string printDeviceTest(const testing::TestParamInfo<nn::Version>& info) {
- switch (info.param) {
- case nn::Version::ANDROID_S:
+ const nn::Version version = info.param;
+ CHECK(!version.runtimeOnlyFeatures);
+ switch (version.level) {
+ case nn::Version::Level::FEATURE_LEVEL_5:
return "v1";
- case nn::Version::FEATURE_LEVEL_6:
+ case nn::Version::Level::FEATURE_LEVEL_6:
return "v2";
+ case nn::Version::Level::FEATURE_LEVEL_7:
+ return "v3";
default:
- LOG(FATAL) << "Invalid AIDL version: " << info.param;
+ LOG(FATAL) << "Invalid AIDL version: " << version;
return "invalid";
}
}
@@ -891,7 +895,8 @@ TEST_P(DeviceTest, allocateDeadObject) {
}
INSTANTIATE_TEST_SUITE_P(TestDevice, DeviceTest,
- ::testing::Values(nn::Version::ANDROID_S, nn::Version::FEATURE_LEVEL_6),
+ ::testing::Values(nn::kVersionFeatureLevel5, nn::kVersionFeatureLevel6,
+ nn::kVersionFeatureLevel7),
printDeviceTest);
} // namespace aidl::android::hardware::neuralnetworks::utils