Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
test-dummy-commands.hpp File Reference

Some dummy command functions used for building unit test cases. More...

Go to the source code of this file.

Description

Some dummy command functions used for building unit test cases.

Any of these functions comes in triples of operation function, undo state capturing function and UNDO function. They are placed into a nested test namespace, together with some global variables, usable as backdoor to verify the effect of calling these functions.

See also
command-use1-test.cpp
CommandBasic_test simple complete command definition example

Definition in file test-dummy-commands.hpp.

#include "lib/error.hpp"
#include "lib/test/test-helper.hpp"
#include "steam/control/command-setup.hpp"
#include <functional>
#include <sstream>
#include <string>

Namespaces

namespace  steam
 Steam-Layer implementation namespace root.
 
namespace  steam::control
 Steam-Layer dispatcher, controller and administrative facilities.
 
namespace  steam::control::test
 
namespace  steam::control::test::command1
 
namespace  steam::control::test::command2
 
namespace  steam::control::test::command3
 

Typedefs

typedef function< string()> FunS
 

Functions

void operate (int someVal)
 
int64_t capture (int)
 
void undoIt (int, int64_t oldVal)
 
void operate (FunS func, bool *fail)
 
string capture (FunS, bool *)
 
void undoIt (FunS, bool *fail, string previousProtocol)
 
void operate ()
 
ulong capture ()
 
void undoIt (ulong oldVal)
 

Variables

CommandSetup test_Dummy_command1
 test dummy command to add the argument to a global variable
 
CommandSetup test_Dummy_command2
 test dummy command to invoke the given functor and append the result onto a global log string buffer
 
CommandSetup test_Dummy_command3
 test dummy command to increment a global variable; no arguments