I worked under the erroneous assumption, that Doxygen will use its internal entity-IDs as the link-IDs when generating mardown-links. Yes, this seemed logical and this would be the way I'd implement it.... But seemingly, Doxygen is not so consistent when it comes to questions of syntax. The same holds true for markdown, which lacking a coherent definition anyway. Another problem is that Doxygen's auto-link generation frequently fails, for reasons not yet clear to me. Sometimes it seems to be necessary to give it a nudge by including the \ref command. While I'm not willing to go into focussed invstigation of Doxygen syntax right now, at least I've done a search-and-replace to remove the malformed links I've written the last days
88 lines
3 KiB
C++
88 lines
3 KiB
C++
/*
|
|
TEST-NEXUS.hpp - fake user interface backbone for test support
|
|
|
|
Copyright (C) Lumiera.org
|
|
2015, 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.
|
|
|
|
*/
|
|
|
|
|
|
/** @file test/test-nexus.hpp
|
|
** A fake UI backbone for investigations and unit testing.
|
|
** Any relevant element within the Lumiera GTK UI is connected to the [UI-Bus](ui-bus.hpp)
|
|
** So for testing and investigation we need a white room setup to provide an instrumented
|
|
** backbone to run any test probes against. The test::Nexus allows to [hook up](\ref testUI())
|
|
** a generic interface element, to participate in a simulated interface interaction.
|
|
**
|
|
** This class test::Nexus acts as front-end for unit tests, while the actual implementation
|
|
** of a test rigged mock interface backbone remains an implementation detail. The purpose
|
|
** of this setup is to capture messages sent from elements operated within a test setup
|
|
** and directed at "core services" (that is, towards a presentation state manager or
|
|
** towards the Proc-Layer for command invocation). Test code may then verify the
|
|
** proper shape and incidence of these messages.
|
|
**
|
|
** @see [abstract-tangible-test.cpp]
|
|
** @see [BusTerm_test]
|
|
**
|
|
*/
|
|
|
|
|
|
#ifndef GUI_TEST_TEST_NEXUS_H
|
|
#define GUI_TEST_TEST_NEXUS_H
|
|
|
|
|
|
#include "lib/error.hpp"
|
|
#include "gui/ctrl/bus-term.hpp"
|
|
#include "lib/test/event-log.hpp"
|
|
|
|
#include <boost/noncopyable.hpp>
|
|
#include <string>
|
|
|
|
|
|
namespace gui {
|
|
namespace test{
|
|
|
|
|
|
/**
|
|
* Mock UI backbone for unit testing.
|
|
* In the absence of a real UI, this simulated [UI-Bus](ui-bus.hpp)
|
|
* can be used to wire a [test probe](\ref MockElm) and address it in unit testing.
|
|
*
|
|
* @note behind the scenes, this is a singleton. Use the provided
|
|
* attachment point testUI() in order to wire and hook up new
|
|
* interface elements. When using or deriving from [MockElm] this
|
|
* wiring happens automatically within the ctor.
|
|
* @see abstract-tangible-test.cpp
|
|
*/
|
|
class Nexus
|
|
: boost::noncopyable
|
|
{
|
|
|
|
public:
|
|
/** get a connection point to a UI backbone faked for test */
|
|
static ctrl::BusTerm& testUI();
|
|
|
|
/** kill the given [BusTerm] and implant a dead terminal in place */
|
|
static void zombificate(ctrl::BusTerm&);
|
|
|
|
static lib::test::EventLog const& getLog();
|
|
};
|
|
|
|
|
|
|
|
}} // namespace gui::test
|
|
#endif /*GUI_TEST_TEST_NEXUS_H*/
|