HandlingPattern: basic unit test pass

This commit is contained in:
Fischlurch 2009-10-01 14:32:26 +02:00
parent 248b87f344
commit 8136b0a4b8
4 changed files with 50 additions and 4 deletions

View file

@ -112,7 +112,7 @@ namespace control {
, NUM_IDS
};
static ID defaultID() { return SYNC; }
static ID defaultID() { return DUMMY; } ///////////TODO: should be ID::SYNC Ticket #211
static HandlingPattern const& get (ID id);

View file

@ -54,6 +54,7 @@ test_components_SOURCES = \
$(testcomponents_srcdir)/proc/control/command-use2-test.cpp \
$(testcomponents_srcdir)/proc/control/command-use3-test.cpp \
$(testcomponents_srcdir)/proc/control/command-registry-test.cpp \
$(testcomponents_srcdir)/proc/control/test-dummy-commands.cpp \
$(testcomponents_srcdir)/proc/control/argument-tuple-accept-test.cpp \
$(testcomponents_srcdir)/proc/control/memento-tie-test.cpp \
$(testcomponents_srcdir)/proc/control/handling-pattern-basics-test.cpp \

View file

@ -0,0 +1,44 @@
/*
test-dummy-commands - global checksum variables used to build test commands
Copyright (C) Lumiera.org
2009, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/control/test-dummy-commands.hpp"
namespace control {
namespace test {
namespace command1 {
long check_ = 0;
}
namespace command2 {
ostringstream check_;
}
}} // namespace control::test

View file

@ -1,5 +1,5 @@
/*
TEST-DUMMY-COMMANDS.hpp - dummy function used to build test commands
TEST-DUMMY-COMMANDS.hpp - dummy functions used to build test commands
Copyright (C) Lumiera.org
2009, Hermann Vosseler <Ichthyostega@web.de>
@ -40,6 +40,7 @@
//#include "pre.hpp"
//#include "lib/test/run.hpp"
#include "lib/error.hpp"
#include "lib/test/test-helper.hpp"
//#include "proc/asset/media.hpp"
//#include "proc/mobject/session.hpp"
@ -86,7 +87,7 @@ namespace test {
namespace command1 { ///< test command just adding a given value
static long check_ = 0;
extern long check_;
inline void
operate (int someVal)
@ -117,7 +118,7 @@ namespace test {
using lumiera::error::External;
static ostringstream check_;
extern ostringstream check_;
typedef function<string()> FunS;