]> git.sesse.net Git - casparcg/blob - unit-test/main.cpp
[scene_producer] Make print() and info() include what the source template file is
[casparcg] / unit-test / main.cpp
1 /*
2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
3 *
4 * This file is part of CasparCG (www.casparcg.com).
5 *
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Author: Helge Norberg, helge.norberg@svt.se
20 */
21
22 #include "stdafx.h"
23
24 #include <gtest/gtest.h>
25
26 #include <common/log.h>
27 #include <common/memory.h>
28
29 #include <core/system_info_provider.h>
30 #include <core/producer/cg_proxy.h>
31 #include <core/producer/media_info/in_memory_media_info_repository.h>
32
33 #include <modules/ffmpeg/ffmpeg.h>
34
35 #include <boost/locale.hpp>
36
37 int main(int argc, char** argv)
38 {
39         using namespace caspar;
40
41         boost::locale::generator gen;
42         gen.categories(boost::locale::codepage_facet);
43         std::locale::global(gen(""));
44
45         spl::shared_ptr<core::system_info_provider_repository> system_info_provider_repo;
46         spl::shared_ptr<core::cg_producer_registry> cg_registry;
47         auto media_info_repo = core::create_in_memory_media_info_repository();
48         spl::shared_ptr<core::help_repository> help_repo;
49         auto producer_registry = spl::make_shared<core::frame_producer_registry>(help_repo);
50         auto consumer_registry = spl::make_shared<core::frame_consumer_registry>(help_repo);
51
52         core::module_dependencies dependencies(system_info_provider_repo, cg_registry, media_info_repo, producer_registry, consumer_registry);
53         caspar::ffmpeg::init(dependencies);
54         testing::InitGoogleTest(&argc, argv);
55
56         caspar::log::set_log_level(L"trace");
57
58         return RUN_ALL_TESTS();
59 }