torc-master
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ValueUnitTest.cpp
Go to the documentation of this file.
1
// Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2
// $HeadURL$
3
// $Id$
4
5
// This program is free software: you can redistribute it and/or modify it under the terms of the
6
// GNU General Public License as published by the Free Software Foundation, either version 3 of the
7
// License, or (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11
// the GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License along with this program. If
14
// not, see <http://www.gnu.org/licenses/>.
15
16
/// \file
17
/// \brief Unit test for the Value class.
18
19
#include <boost/test/unit_test.hpp>
20
#include "
torc/generic/Value.hpp
"
21
22
namespace
torc {
23
namespace
generic {
24
25
BOOST_AUTO_TEST_SUITE(
generic
)
26
27
/// \brief Unit test for the Value class.
28
BOOST_AUTO_TEST_CASE
(ValueUnitTest) {
29
// functions not tested:
30
// Value::MiNoMax::MiNoMax();
31
// Value::MiNoMax::MiNoMax(Value::Number inMin, Value::Number inNominal, Value::Number inMax);
32
// Value::MiNoMax::~MiNoMax();
33
// Value::MiNoMax::MiNoMax(const Value::MiNoMax& inSource);
34
// Value::MiNoMax& Value::MiNoMax::operator=(const Value::MiNoMax& inSource);
35
// bool Value::MiNoMax::operator <(const Value::MiNoMax& inRhs) const;
36
// bool Value::MiNoMax::operator ==(const Value::MiNoMax& inRhs) const;
37
// bool Value::MiNoMax::operator >(const Value::MiNoMax& inRhs) const;
38
// bool Value::MiNoMax::operator >=(const Value::MiNoMax& inRhs) const;
39
// bool Value::MiNoMax::operator <=(const Value::MiNoMax& inRhs) const;
40
// bool Value::MiNoMax::operator !=(const Value::MiNoMax& inRhs) const;
41
// void Value::MiNoMax::setMax(const Value::Number& inSource);
42
// void Value::MiNoMax::setMin(const Value::Number& inSource);
43
// void Value::MiNoMax::setNominal(const Value::Number& inSource);
44
// Value::Number::Number();
45
// Value::Number::Number(int32_t inMantissa, int32_t inExponent);
46
// Value::Number::~Number();
47
// Value::Number::Number(const Value::Number& inSource);
48
// Value::Number& Value::Number::operator=(const Value::Number& inSource);
49
// bool Value::Number::operator <(const Value::Number& inRhs) const;
50
// bool Value::Number::operator ==(const Value::Number& inRhs) const;
51
// bool Value::Number::operator >(const Value::Number& inRhs) const;
52
// bool Value::Number::operator >=(const Value::Number& inRhs) const;
53
// bool Value::Number::operator <=(const Value::Number& inRhs) const;
54
// bool Value::Number::operator !=(const Value::Number& inRhs) const;
55
// void Value::Number::setMantissa(const int32_t& inSource);
56
// void Value::Number::setExponent(const int32_t& inSource);
57
// Value::Point::Point();
58
// Value::Point::Point(int32_t inX, int32_t inY);
59
// Value::Point::~Point();
60
// Value::Point::Point(const Value::Point& inSource);
61
// Value::Point& Value::Point::operator=(const Value::Point& inSource);
62
// bool Value::Point::operator <(const Value::Point& inRhs) const;
63
// bool Value::Point::operator ==(const Value::Point& inRhs) const;
64
// bool Value::Point::operator >(const Value::Point& inRhs) const;
65
// bool Value::Point::operator >=(const Value::Point& inRhs) const;
66
// bool Value::Point::operator <=(const Value::Point& inRhs) const;
67
// bool Value::Point::operator !=(const Value::Point& inRhs) const;
68
// void Value::Point::setX(const int32_t& inSource);
69
// void Value::Point::setY(const int32_t& inSource);
70
// Value::Value();
71
// Value::Value(Value::Type type);
72
// Value::~Value();
73
// Value::Value(const Value& inSource);
74
// Value& Value::operator=(const Value& inSource);
75
// void Value::setType(const Value::Type& inSource);
76
// void Value::setIsSet(const bool& inSource);
77
// template <class Archive> void Value::serialize(Archive& ar, unsigned int);
78
// template void Value::serialize<boost::archive::binary_iarchive>(
79
// boost::archive::binary_iarchive& ar, const unsigned int);
80
// template void Value::serialize<boost::archive::binary_oarchive>(
81
// boost::archive::binary_oarchive& ar, const unsigned int);
82
83
// functions tested:
84
// Value::Number::Number(int32_t inMantissa, int32_t inExponent);
85
// double Value::Number::eval() const;
86
Value::Number
number(2, 2);
87
BOOST_CHECK_EQUAL(number.
eval
(), 200);
// for SourceForge bug 3587203.
88
}
89
90
BOOST_AUTO_TEST_SUITE_END()
91
92
}
// namespace generic
93
}
// namespace torc
torc::generic::Value::Number::eval
double eval() const
Definition:
Value.cpp:142
Value.hpp
torc::generic::BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(Om1UnitTest)
Unit test for the generic object model.
Definition:
Om1UnitTest.cpp:88
torc::generic::Value::Number
Definition:
Value.hpp:67
src
torc
generic
ValueUnitTest.cpp
Generated on Thu Dec 18 2014 16:30:40 for torc-master by
1.8.6