blob: 3bdc5cdea7f4344ebfecd379f397bf2d8e4045ba [file] [log] [blame]
Slava Shklyaev871be942018-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 "Models.h"
20#include "VtsHalNeuralnetworks.h"
21
22namespace android {
23namespace hardware {
24namespace neuralnetworks {
25namespace V1_2 {
26namespace vts {
27namespace functional {
28
29// forward declarations
30std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
31
32// generate validation tests
33#define VTS_CURRENT_TEST_CASE(TestName) \
34 TEST_F(ValidationTest, TestName) { \
35 const Model model = TestName::createTestModel(); \
36 const std::vector<Request> requests = createRequests(TestName::examples); \
37 validateModel(model); \
38 validateRequests(model, requests); \
39 }
40
41FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
42
43#undef VTS_CURRENT_TEST_CASE
44
45} // namespace functional
46} // namespace vts
47} // namespace V1_2
48} // namespace neuralnetworks
49} // namespace hardware
50} // namespace android