1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef SYSTEM_TEST_END_TO_END_TEST 17 #define SYSTEM_TEST_END_TO_END_TEST 18 19 #include <cmath> 20 #include <cstdio> 21 #include <vector> 22 23 #include "neural_network_runtime/neural_network_runtime.h" 24 #include "test/system_test/common/nnrt_test.h" 25 26 namespace OHOS { 27 namespace NeuralNetworkRuntime { 28 namespace SystemTest { 29 class End2EndTest : public NNRtTest { 30 public: 31 End2EndTest() = default; 32 33 OH_NN_ReturnCode BuildModel(const std::vector<CppTensor>& tensors); 34 OH_NN_ReturnCode IsExpectedOutput(const float* outputBuffer); 35 OH_NN_ReturnCode IsExpectedOutput(const OH_NN_Memory* outputMemory); 36 }; 37 } // namespace SystemTest 38 } // NeuralNetworkRuntime 39 } // OHOS 40 41 #endif // SYSTEM_TEST_END_TO_END_TEST