LUMIERA.clone/tests/steam/control/handling-pattern-standard-impl-test.cpp
Ichthyostega 3caa5cfb03 Tests: reorganise test folders
This resolves a long-standing issue:
we could not use proper include paths for test-helper code that was defined alongside the tests.

Since some test-helper code must now be relocated into the »Vault«-Layer,
I took the opportunity to finally resolve this annoyance. The solution is two-fold
 * introduce a dedicated test-support library
 * remove the quirks that were necessary to support some plain-C tests
Together, this allows to raise the include-directory by one level,
and then to adjust all folder names so that they match the namespace
2026-03-07 00:56:19 +01:00

114 lines
3.1 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
HandlingPatternStandardImpl(Test) - cover the provided standard command handling patterns
Copyright (C)
2009, Hermann Vosseler <Ichthyostega@web.de>
  **Lumiera** 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. See the file COPYING for further details.
* *****************************************************************/
/** @file handling-pattern-standard-impl-test.cpp
** unit test \ref HandlingPatternStandardImpl_test
*/
#include "test/run.hpp"
//#include "test/test-helper.hpp"
//#include "steam/asset/media.hpp"
//#include "steam/mobject/session.hpp"
//#include "steam/mobject/session/edl.hpp"
//#include "steam/mobject/session/testclip.hpp"
//#include "steam/mobject/test-dummy-mobject.hpp"
//#include "lib/p.hpp"
//#include "steam/mobject/placement.hpp"
//#include "steam/mobject/session/placement-index.hpp"
//#include "steam/mobject/explicitplacement.hpp"
#include "steam/control/command.hpp"
#include "steam/control/command-impl.hpp"
#include "steam/control/command-registry.hpp"
//#include "steam/control/command-def.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/symbol.hpp"
//#include "lib/util.hpp"
#include "steam/control/test-dummy-commands.hpp"
//#include <functional>
//#include <boost/ref.hpp>
//#include <cstdlib>
//#include <string>
namespace steam {
namespace control {
namespace test {
//using util::contains;
using std::function;
// using std::bind;
// using std::string;
//using std::rand;
// using test::showSizeof;
// using util::isSameObject;
// using util::contains;
// using session::test::TestClip;
// using lib::Symbol;
// using lumiera::P;
// using lumiera::error::LUMIERA_ERROR_EXTERNAL;
namespace { // test data and helpers...
// Symbol TEST_CMD = "test.command1.1";
// Symbol TEST_CMD2 = "test.command1.2";
}
/*******************************************************************//**
* @test verify correct behaviour of all the command handling patterns
* provided by the default configuration of a lumiera session.
* - executing quasi synchronous
* - the throw-on-error variant
* - background execution
* - ...?
* @todo define and code those handling patterns; Ticket #210
*
* @see HandlingPattern
* @see CommandRegistry
* @see command.hpp
* @see command-basic-test.cpp
*/
class HandlingPatternStandardImpl_test : public Test
{
uint cnt_inst;
virtual void
run (Arg)
{
CommandRegistry& registry = CommandRegistry::instance();
CHECK (&registry);
cnt_inst = registry.instance_count();
UNIMPLEMENTED ("unit test to cover the standard command handling patterns");
CHECK (cnt_inst == registry.instance_count());
}
};
/** Register this test class... */
LAUNCHER (HandlingPatternStandardImpl_test, "function controller");
}}} // namespace steam::control::test