Refactor build system and add internal test
[platform/core/security/libcryptsvc.git] / test / main.cc
1 /*
2  *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Kyungwook Tak <k.tak@samsung.com>
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License
17  *
18  * @file        main.cc
19  * @author      Kyungwook Tak (k.tak@samsung.com)
20  * @version     1.0
21  * @brief       cryptsvc test main
22  */
23 #define BOOST_TEST_MODULE CRYPTO_SERVICE_TEST
24
25 #include <boost/test/unit_test.hpp>
26 #include <boost/test/unit_test_log.hpp>
27 #include <boost/test/results_reporter.hpp>
28
29 #include <colour_log_formatter.h>
30
31 struct TestConfig {
32     TestConfig()
33     {
34         boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_test_units);
35         boost::unit_test::results_reporter::set_level(boost::unit_test::SHORT_REPORT);
36         boost::unit_test::unit_test_log.set_formatter(new cryptsvc::colour_log_formatter);
37     }
38
39     ~TestConfig() {}
40 };
41
42 BOOST_GLOBAL_FIXTURE(TestConfig);