COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
test
common
utest-uucount.cpp
Go to the documentation of this file.
1
// Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2
//
3
// This software is distributed under the terms of the
4
// GNU Lesser General Public License version 3 (LGPLv3).
5
// See doc/lgpl.txt and doc/gpl.txt for the license text.
6
7
#define BOOST_TEST_DYN_LINK
8
#define BOOST_TEST_MODULE "Test module for cf3::Component"
9
10
#include <boost/test/unit_test.hpp>
11
12
#include "
common/BasicExceptions.hpp
"
13
#include "
common/UUCount.hpp
"
14
15
using namespace
cf3
;
16
using namespace
cf3::common
;
17
18
20
21
BOOST_AUTO_TEST_SUITE( UUCountSuite )
22
23
25
BOOST_AUTO_TEST_CASE
( UUCountCompare )
26
{
27
UUCount
a
,
b
;
28
UUCount
c =
a
;
29
30
BOOST_CHECK(a != b);
31
BOOST_CHECK(b > a);
32
BOOST_CHECK(a < b);
33
34
BOOST_CHECK(a == c);
35
BOOST_CHECK(a >= c);
36
BOOST_CHECK(a <= c);
37
}
38
39
BOOST_AUTO_TEST_CASE
( UUSerialization )
40
{
41
UUCount
a
;
42
UUCount
b
(a.
string
());
43
BOOST_CHECK(a ==
b
);
44
45
BOOST_CHECK_THROW(
UUCount
(
"lala"
),
ParsingFailed
);
46
BOOST_CHECK_THROW(
UUCount
(
"lala:lolo"
),
ParsingFailed
);
47
BOOST_CHECK_THROW(
UUCount
(
"lala:1"
),
ParsingFailed
);
48
BOOST_CHECK_THROW(
UUCount
(
"01234567-89ab-cdef-0123-456789abcdef:lala"
),
ParsingFailed
);
49
50
UUCount
c(
"01234567-89ab-cdef-0123-456789abcdef:1"
);
51
BOOST_CHECK_EQUAL(c.
string
(),
"01234567-89ab-cdef-0123-456789abcdef:1"
);
52
53
UUCount
d(
""
);
54
BOOST_CHECK(d.is_nil());
55
}
56
58
59
BOOST_AUTO_TEST_SUITE_END()
60
61
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(UUCountCompare)
Definition:
utest-uucount.cpp:25
cf3::common::UUCount::string
std::string string() const
Definition:
UUCount.cpp:79
utest-python-math.a
float a
Definition:
utest-python-math.py:3
cf3::common::ParsingFailed
Definition:
BasicExceptions.hpp:200
cf3
Top-level namespace for coolfluid.
Definition:
Action.cpp:18
cf3::common::UUCount
Combination of a UUID and a count, together forming the equivalent of a 192-bit identifier.
Definition:
UUCount.hpp:21
UUCount.hpp
utest-python-math.b
float b
Definition:
utest-python-math.py:4
BasicExceptions.hpp
cf3::common
Most basic kernel library.
Definition:
Action.cpp:19
Generated on Sun Jun 14 2015 21:20:16 for COOLFluiD by
1.8.9.1
Send comments to:
COOLFluiD Web Admin