~e7appew/ubuntu/vivid/bombono-dvd/mux-files-with-spaces

« back to all changes in this revision

Viewing changes to .pc/3b236fb21d9f0dd59cd5f8aa4a902dfc8af2e18b.patch/src/mgui/tests/test_author.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-05-02 22:09:31 UTC
  • Revision ID: package-import@ubuntu.com-20130502220931-pui7uqs6b468z8sb
Tags: 1.2.1-0ubuntu5
Cherry-pick patches from upstream to build against boost1.53.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// mgui/tests/test_author.cpp
 
3
// This file is part of Bombono DVD project.
 
4
//
 
5
// Copyright (c) 2009-2010 Ilya Murav'jov
 
6
//
 
7
// This program is free software; you can redistribute it and/or modify
 
8
// it under the terms of the GNU General Public License as published by
 
9
// the Free Software Foundation; either version 2 of the License, or
 
10
// (at your option) any later version.
 
11
//
 
12
// This program is distributed in the hope that it will be useful,
 
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
// GNU General Public License for more details.
 
16
//
 
17
// You should have received a copy of the GNU General Public License
 
18
// along with this program; if not, write to the Free Software
 
19
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
20
// 
 
21
 
 
22
#include <mgui/tests/_pc_.h>
 
23
 
 
24
#include "test_author.h"
 
25
#include "test_mbrowser.h"
 
26
 
 
27
#include <mgui/init.h>
 
28
#include <mgui/author/script.h>
 
29
 
 
30
#include <boost/filesystem/convenience.hpp> // fs::create_directories()
 
31
 
 
32
namespace Project 
 
33
{
 
34
 
 
35
bool AuthorDVDTest(const std::string& dir)
 
36
{
 
37
    fs::create_directories(dir);
 
38
    std::string err_str;
 
39
    BOOST_CHECK( ClearAllFiles(dir, err_str) );
 
40
 
 
41
    return Author::IsGood(AuthorDVD(dir));
 
42
}
 
43
 
 
44
 
 
45
static void TestAuthoringEx(const std::string& prj_fname, const std::string& out_dir)
 
46
{
 
47
    GtkmmDBInit gd_init;
 
48
    InitAndLoadPrj(prj_fname);
 
49
 
 
50
    Execution::ConsoleMode cam;
 
51
    BOOST_CHECK( AuthorDVDTest(out_dir) );
 
52
}
 
53
 
 
54
// неинтерактивный вариант авторинга
 
55
BOOST_AUTO_TEST_CASE( TestAuthoring )
 
56
{
 
57
    if( !IsTestOn("./test_author") )
 
58
        return;
 
59
    TestAuthoringEx(TestProjectPath(), "../dvd_out");
 
60
}
 
61
 
 
62
// :TODO: это долгий тест, по умолчанию не включаем;
 
63
// реализовать декларацию функции BOOST_AUTO_TEST_CASE_LOOOONG()
 
64
//
 
65
// регрессионный тест
 
66
//
 
67
//BOOST_AUTO_TEST_CASE( TestAuthoringRegression )
 
68
//{
 
69
//    TestAuthoringEx(TestProjectPath("menus-regression.xml"), "../dvd_out-regression");
 
70
//}
 
71
 
 
72
} // namespace Project
 
73
 
 
74