mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 10:05:19 +00:00
Add a VTS test to validate NNAPI driver name string. am: cc18d3fede
Change-Id: Idf27e80e73b8e4b98bc3e11c4abed5e19faa8e07
This commit is contained in:
@@ -79,6 +79,18 @@ TEST_P(NeuralnetworksHidlTest, GetDeviceTypeTest) {
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
}
|
||||
|
||||
// device name test
|
||||
TEST_P(NeuralnetworksHidlTest, GetDeviceNameTest) {
|
||||
const std::string deviceName = getName(GetParam());
|
||||
auto pos = deviceName.find('-');
|
||||
EXPECT_NE(pos, std::string::npos);
|
||||
// The separator should not be the first or last character.
|
||||
EXPECT_NE(pos, 0);
|
||||
EXPECT_NE(pos, deviceName.length() - 1);
|
||||
// There should only be 1 separator.
|
||||
EXPECT_EQ(std::string::npos, deviceName.find('-', pos + 1));
|
||||
}
|
||||
|
||||
// device supported extensions test
|
||||
TEST_P(NeuralnetworksHidlTest, GetDeviceSupportedExtensionsTest) {
|
||||
Return<void> ret = kDevice->getSupportedExtensions(
|
||||
|
||||
Reference in New Issue
Block a user