tizen 2.4 release
[framework/security/key-manager.git] / tests / main_lcov.cpp
1 /*
2  *  Copyright (c) 2000 - 2015 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  * @file       main.cpp
18  * @author     Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
19  * @version    1.0
20  */
21
22 #define BOOST_TEST_MODULE CKM_TEST_LCOV_INTERNAL
23 #define BOOST_TEST_MAIN
24
25
26 #include <iostream>
27 #include <key-provider.h>
28 #include <boost/test/unit_test.hpp>
29 #include <boost/test/unit_test_log.hpp>
30 #include <boost/test/results_reporter.hpp>
31 #include <colour_log_formatter.h>
32 #include <dpl/log/log.h>
33
34 struct TestConfig {
35     TestConfig() {
36         boost::unit_test::unit_test_log.set_threshold_level( boost::unit_test::log_test_units);
37         boost::unit_test::results_reporter::set_level(boost::unit_test::SHORT_REPORT);
38         boost::unit_test::unit_test_log.set_formatter(new CKM::colour_log_formatter);
39     }
40     ~TestConfig(){
41     }
42 };
43
44 bool isLibInitialized = false;
45
46 struct KeyProviderLib {
47     KeyProviderLib() {
48     }
49     ~KeyProviderLib() {
50     }
51 };
52
53 struct LogSetup {
54     LogSetup() {
55         CKM::Singleton<CKM::Log::LogSystem>::Instance().SetTag("CKM_INTERNAL_TESTS");
56     }
57     ~LogSetup() {}
58 };
59
60 BOOST_GLOBAL_FIXTURE(KeyProviderLib)
61 BOOST_GLOBAL_FIXTURE(TestConfig)
62 BOOST_GLOBAL_FIXTURE(LogSetup)
63