CppUnitLite
Failure.h
Go to the documentation of this file.
1
/* ----------------------------------------------------------------------------
2
3
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
4
* Atlanta, Georgia 30332-0415
5
* All Rights Reserved
6
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8
* See LICENSE for the license information
9
10
* -------------------------------------------------------------------------- */
11
12
14
//
15
// FAILURE.H
16
//
17
// Failure is a class which holds information pertaining to a specific
18
// test failure. The stream insertion operator is overloaded to allow easy
19
// display.
20
//
22
23
24
#pragma once
25
26
#include <string>
27
28
class
Failure
29
{
30
31
public
:
32
Failure
(
const
std::string& theTestName,
33
const
std::string& theFileName,
34
long
theLineNumber,
35
const
std::string& theCondition)
36
:
message
(theCondition),
37
testName
(theTestName),
38
fileName
(theFileName),
39
lineNumber
(theLineNumber)
40
{
41
}
42
43
Failure
(
const
std::string& theTestName,
44
const
std::string& theFileName,
45
const
std::string& theCondition)
46
:
message
(theCondition),
47
testName
(theTestName),
48
fileName
(theFileName),
49
lineNumber
(-1)
50
{
51
}
52
53
54
Failure
(
const
std::string& theTestName,
55
const
std::string& theFileName,
56
long
theLineNumber,
57
const
std::string&
expected
,
58
const
std::string& actual)
59
:
message
(
"expected "
+
expected
+
" but was: "
+ actual),
60
testName
(theTestName),
61
fileName
(theFileName),
62
lineNumber
(theLineNumber)
63
{
64
}
65
66
std::string
message
;
67
std::string
testName
;
68
std::string
fileName
;
69
long
lineNumber
;
70
};
Failure::message
std::string message
Definition:
Failure.h:66
Failure
Definition:
Failure.h:28
Failure::fileName
std::string fileName
Definition:
Failure.h:68
Failure::Failure
Failure(const std::string &theTestName, const std::string &theFileName, const std::string &theCondition)
Definition:
Failure.h:43
Failure::lineNumber
long lineNumber
Definition:
Failure.h:69
cholesky::expected
Matrix expected
Definition:
testMatrix.cpp:971
Failure::Failure
Failure(const std::string &theTestName, const std::string &theFileName, long theLineNumber, const std::string &expected, const std::string &actual)
Definition:
Failure.h:54
Failure::Failure
Failure(const std::string &theTestName, const std::string &theFileName, long theLineNumber, const std::string &theCondition)
Definition:
Failure.h:32
Failure::testName
std::string testName
Definition:
Failure.h:67
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:17