LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
TestCaseError.hpp
Go to the documentation of this file.
1
// Copyright 2002-2013 CEA LIST
2
// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3
//
4
// SPDX-License-Identifier: MIT
5
6
/***************************************************************************
7
* Copyright (C) 2004 by Benoit Mathieu *
8
* mathieub@zoe.cea.fr *
9
* *
10
***************************************************************************/
11
#ifndef LIMA_COMMON_TGV_TESTCASEERROR_HPP
12
#define LIMA_COMMON_TGV_TESTCASEERROR_HPP
13
14
#include "
TestCase.h
"
15
16
#include <string>
17
#include <map>
18
#include <list>
19
#include <stdexcept>
20
#include "
common/LimaCommon.h
"
21
22
namespace
Lima
23
{
24
namespace
Common
25
{
26
namespace
TGV
27
{
28
29
class
LIMA_TGV_EXPORT
TestCaseError
30
{
31
public
:
32
enum
ErrorTypes
33
{
34
NoError
,
35
InvalidKey
,
36
InvalidOperator
,
37
TestCaseFailed
38
};
39
TestCaseError
() : m_type(NoError), m_reason(
""
), m_conditional(false) {}
40
41
TestCaseError
(
const
TestCase
& tc,
42
const
std::string& reason,
43
const
std::string& pipeline);
44
45
TestCaseError
(
const
TestCase
& tc, ErrorTypes type,
46
const
std::string& reason,
47
const
std::string& pipeline,
48
const
TestCase::TestUnit
& tu);
49
50
TestCaseError
(
const
TestCaseError
& error) :
51
m_type(error.m_type) ,m_reason(error.m_reason), m_conditional(error.m_conditional) {}
52
53
TestCaseError
&
operator=
(
const
TestCaseError
& error)
54
{
55
m_type = error.
m_type
;
56
m_reason = error.
m_reason
;
57
m_conditional = error.
m_conditional
;
58
return
*
this
;
59
}
60
61
virtual
~TestCaseError
() =
default
;
62
63
const
std::string&
what
()
const
{
return
m_reason;}
64
ErrorTypes
operator()
() {
return
m_type;}
65
bool
isConditional
()
const
{
return
m_conditional;}
66
67
protected
:
68
ErrorTypes
m_type
;
69
std::string
m_reason
;
70
bool
m_conditional
;
71
};
72
73
74
75
}
// TGV
76
}
// Common
77
}
// Lima
78
79
#endif
LimaCommon.h
LIMA_TGV_EXPORT
#define LIMA_TGV_EXPORT
Definition
LinguisticProcessingCommon.h:86
TestCase.h
Lima::Common::TGV::TestCaseError
Definition
TestCaseError.hpp:30
Lima::Common::TGV::TestCaseError::TestCaseError
TestCaseError(const TestCaseError &error)
Definition
TestCaseError.hpp:50
Lima::Common::TGV::TestCaseError::m_conditional
bool m_conditional
Definition
TestCaseError.hpp:70
Lima::Common::TGV::TestCaseError::operator=
TestCaseError & operator=(const TestCaseError &error)
Definition
TestCaseError.hpp:53
Lima::Common::TGV::TestCaseError::TestCaseError
TestCaseError()
Definition
TestCaseError.hpp:39
Lima::Common::TGV::TestCaseError::ErrorTypes
ErrorTypes
Definition
TestCaseError.hpp:33
Lima::Common::TGV::TestCaseError::InvalidOperator
@ InvalidOperator
Definition
TestCaseError.hpp:36
Lima::Common::TGV::TestCaseError::NoError
@ NoError
Definition
TestCaseError.hpp:34
Lima::Common::TGV::TestCaseError::InvalidKey
@ InvalidKey
Definition
TestCaseError.hpp:35
Lima::Common::TGV::TestCaseError::what
const std::string & what() const
Definition
TestCaseError.hpp:63
Lima::Common::TGV::TestCaseError::m_type
ErrorTypes m_type
Definition
TestCaseError.hpp:68
Lima::Common::TGV::TestCaseError::~TestCaseError
virtual ~TestCaseError()=default
Lima::Common::TGV::TestCaseError::isConditional
bool isConditional() const
Definition
TestCaseError.hpp:65
Lima::Common::TGV::TestCaseError::operator()
ErrorTypes operator()()
Definition
TestCaseError.hpp:64
Lima::Common::TGV::TestCaseError::m_reason
std::string m_reason
Definition
TestCaseError.hpp:69
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::Common::TGV::TestCase::TestUnit
Definition
TestCase.h:48
Lima::Common::TGV::TestCase
Definition
TestCase.h:37
lima_linguisticprocessing
src
linguisticProcessing
common
tgv
TestCaseError.hpp
Generated by
1.9.8