blob: eb3ebd326bf1aa3ab23d1481e07798b37ada01fd [file] [log] [blame]
Slava Shklyaevfeb87a92018-09-12 14:52:02 +01001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define LOG_TAG "neuralnetworks_hidl_hal_test"
18
19#include "VtsHalNeuralnetworks.h"
20
21namespace android {
22namespace hardware {
23namespace neuralnetworks {
24namespace V1_2 {
25namespace vts {
26namespace functional {
27
28using V1_1::Capabilities;
29
30// create device test
31TEST_F(NeuralnetworksHidlTest, CreateDevice) {}
32
33// status test
34TEST_F(NeuralnetworksHidlTest, StatusTest) {
35 Return<DeviceStatus> status = device->getStatus();
36 ASSERT_TRUE(status.isOk());
37 EXPECT_EQ(DeviceStatus::AVAILABLE, static_cast<DeviceStatus>(status));
38}
39
Miao Wang618028b2018-09-20 11:35:42 -070040// device version test
41TEST_F(NeuralnetworksHidlTest, GetDeviceVersionStringTest) {
42 Return<void> ret = device->getVersionString([](ErrorStatus status, const hidl_string& version) {
43 EXPECT_EQ(ErrorStatus::NONE, status);
44 EXPECT_LT(0, version.size());
45 });
46 EXPECT_TRUE(ret.isOk());
47}
Slava Shklyaevfeb87a92018-09-12 14:52:02 +010048} // namespace functional
49} // namespace vts
50} // namespace V1_2
51} // namespace neuralnetworks
52} // namespace hardware
53} // namespace android