741c0fb4748b9f4878020312fdffe5d28ca32691
[platform/core/ml/nnfw.git] / tests / nnfw_api / src / main.cc
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
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 #include <iostream>
18 #include <stdexcept>
19 #include <string>
20 #include <gtest/gtest.h>
21 #include "NNPackages.h"
22
23 int main(int argc, char **argv)
24 {
25   NNPackages::get().init(argv[0]);
26   ::testing::InitGoogleTest(&argc, argv);
27
28   try
29   {
30     NNPackages::get().checkAll();
31   }
32   catch (std::runtime_error &e)
33   {
34     std::cerr << e.what() << std::endl;
35     return -1;
36   }
37
38   return RUN_ALL_TESTS();
39 }