COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-ui-core-nbrowser.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2011 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 the ui NBrowser class"
9 
10 #include "ui/core/NBrowser.hpp"
11 
13 
14 using namespace cf3::common;
15 using namespace cf3::ui::core;
16 
19 
20 BOOST_AUTO_TEST_SUITE( uiCoreNBrowserSuite )
21 
22 
25 {
26  application();
27 
32 }
33 
35 
36 BOOST_AUTO_TEST_CASE( generate_name )
37 {
38  NBrowser b;
39 
40  BOOST_CHECK_EQUAL(b.generate_name(), std::string("Browser_0"));
41  BOOST_CHECK_EQUAL(b.generate_name(), std::string("Browser_1"));
42  BOOST_CHECK_EQUAL(b.generate_name(), std::string("Browser_2"));
43 
44  for(int i = 0 ; i < 15 ; i++)
45  b.generate_name();
46 
47  BOOST_CHECK_EQUAL(b.generate_name(), std::string("Browser_18"));
48 }
49 
52 
53 BOOST_AUTO_TEST_SUITE_END()
QApplication * application()
Definition: Application.hpp:11
bool AssertionThrows
assertions throw exceptions
Definition: Assertions.hpp:67
bool ExceptionOutputs
if exception contructor should output
Definition: Exception.hpp:32
static AssertionManager & instance()
Gets the instance of the manager.
Definition: Assertions.cpp:33
Basic Classes for client-core library used by coolfluid-client application.
Definition: CNode.cpp:57
bool AssertionDumps
assertions dump backtraces
Definition: Assertions.hpp:65
bool ExceptionDumps
if exception contructor should dump backtrace
Definition: Exception.hpp:34
Component that manages remote browsers. This class subclasses CNode class.
Definition: NBrowser.hpp:32
static ExceptionManager & instance()
Gets the instance of the manager.
Definition: Exception.cpp:34
std::string generate_name()
Generates a name for a browser The name has the format "Browser_i" where "i" is the value of an inter...
Definition: NBrowser.cpp:30
Most basic kernel library.
Definition: Action.cpp:19
BOOST_AUTO_TEST_CASE(init)
Send comments to:
COOLFluiD Web Admin