Commit graph

1660 commits

Author SHA1 Message Date
2e4d74747e implement logging overrides in the Test-Nexus implementation
the actual functionality is forwareded to the base class,
which is the regular Nexus Hub
2016-01-02 19:16:37 +01:00
3230660d86 implement, cover and use the log clearing function 2016-01-02 02:00:07 +01:00
c6945a452e need helper functionality for tests to scrap existing log contents
...this is necessary whenever the mocked facility covered
by log matching is managed automatically as singleton,
because then other test cases will leave garbage
in the log
2016-01-02 01:41:53 +01:00
d27d9f79c2 define first test case to cover the UI-Bus side of basic element interactions
this test is intended as counterpart to
AbstractTangible_test::verify_mockManipulation()

It creates a mock element and verifies bidirectional
connnectivity to the UI-Bus
2016-01-02 01:23:09 +01:00
603f9e2b7d DOC: fix some Doxygen link syntax
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
2015-12-27 03:16:49 +01:00
dddcbe9994 DOC: supply basics of UI-Bus and generic UI-element protocol
the initial draft of this concept is in place now, and
the first round of unit tests pass. I've got some understanding
of the purpose of the interactions and involved elements
and I'm confident this design is evolving in a sane way.

Note: extensive documentation is in the TiddlyWiki,
here I've just pasted and reworded some paragraphs from there
and integrated them into the Doxygen docs
2015-12-27 01:58:15 +01:00
a91d6a3bae implement and cover the zombie network 2015-12-26 22:56:43 +01:00
d7191959cf fix a zombie segementation fault
hey, it's still X-mas...
2015-12-26 21:53:46 +01:00
8cd31443b1 invent a suicidal zombie terminal
yeah, it's X-mas time,
letz build a diagnostic network of deceased widgets...
2015-12-26 20:41:24 +01:00
f23b482d7d adjust test code to get MockElm log joining to PASS
the "log joining" functionality was already implemented
and covered with the generic event log facility, but this test
here was drafted even before that, meaning that the semantics
of matchingn on the log, especially on events, as been
implemented slightly different than planned
2015-12-26 04:55:00 +01:00
b9ef66b221 provide and cover a mock implementation of receiving notification messages 2015-12-26 04:40:38 +01:00
3239ea1f87 occasional clean-up of somewhat confusing variable names in test
you'd expect a variable s1 to be a string, wouldn't you?
2015-12-26 02:34:22 +01:00
9aa1fec369 UI-Element protocol: clarify the role of the doExpand() extension point
and let the concrete extension point decide if the corresponding
state change was actually relevant and should be persisted
2015-12-26 00:59:16 +01:00
3a287bf134 implement the generic expand/collapse mechanism 2015-12-25 03:53:26 +01:00
5564a51a79 build/platform: make lib SigC++ available for GUI test code
Explanation: sigC++ was already linked as transitive dependency
from gtkmm, since it is used for the "signal-slot" system wihin GTK.
But now we want to use sigC++ itself from our generic UI-Backbone,
so we need to pick up the additional compiler and linker flags
and use them when building the relevant parts of both the application
and the test suite
2015-12-25 03:06:33 +01:00
4d1fcd6dcb implement logging/identification of mock UI elements 2015-12-25 00:41:14 +01:00
37802fd699 complete wiring of nexus and core services
since, by definition, the Nexus is "the" up-link,
all we need is clever overriding of the relevant
handling functions, so the nexus will care for the routing,
while the CoreService cares for command and presentation
state handling
2015-12-19 04:05:21 +01:00
0f793e0a79 untangle the setup of test nexus 2015-12-18 19:50:57 +01:00
d673d1ed1c better naming of the test facility
I think it is a shame to waste the nice name "nexus"
just for a test facility; rather I've named our central
routing hub in the UI-Bus gui::ctrl::Nexus


So it makes sense to name the fake for unit testing
the test-nexus (we're not at nexus 5 yet)
2015-12-18 19:50:57 +01:00
f19ebd63d0 pondering about how to connect the central bus hub
...especially since we need a faked UI backbone for unit testing
2015-12-18 19:50:02 +01:00
af98d75da4 consider the bus side of the generic UI base in more detail
especially define the outline of the bus communication
and connection management
2015-12-18 01:02:19 +01:00
59c2d2b482 WIP: start implementing the generic UI base 2015-12-16 23:24:11 +01:00
a9a6aabcbc return to topic: UI element protocol
next step will be to rig the mock element and set up
and cover the basic / generic element behaviour

This changeset
 - adapts the (planned) unit test to the semantic of
   the EventLog, which is now fully implemented

 - adjusts the function names on the public Tangible interface,
   to be better in line with the naming convention of the
   corrsponding operations on the UI-Bus:

   * "mark" operations are towards the UI element
   * "note" messages are from the UI element towards some
     state manager, which can be reached via the bus
2015-12-16 02:16:53 +01:00
cb4a0a6e60 change the EventLog header to store a "this" attribute
seems more logical than calling the attribute "ID",
especially since we're now able to use the on("xyz") matcher
2015-12-15 23:44:34 +01:00
c8068496d1 EventLog unit test PASS
so this turned out to be rather expensive,
while actually not difficult to implement.
On the way, I've learned
- how to build a backtracking matcher, based on
  a filtering (monadic) structure and chained lambdas
- learned the hard way how (not) to return a container
  by move-reference
- made first contact with the regular expressions
  now available from the standard library
2015-12-13 05:03:36 +01:00
d0cdae2cee implement matching on regular expressions 2015-12-13 03:24:25 +01:00
c13b859aa5 fix typo in test assertion 2015-12-13 02:02:54 +01:00
42a5668831 implement further match refinements (type, attribute, target) 2015-12-12 23:41:24 +01:00
33f7fe116a implement refinement filter on log entry's arguments.
Whew! functional programming is such a powerful concept.
You get additional refinement and lazy backtracking
basically for free....
2015-12-12 03:13:32 +01:00
894ef68a8f EventLog: implement logging of function invocations 2015-12-12 01:01:46 +01:00
761154ae63 stub the code into submission.... 2015-12-11 20:02:30 +01:00
a9096d8781 WIP: draft further logging functionality to cover
damn nasty how much (eays to implement) functionality
you obviously want to have on any logging facility.
2015-12-11 02:27:14 +01:00
f489343401 WIP: draft behaviour of function call logging 2015-12-10 22:51:31 +01:00
bf92333339 implement log joining in shared heap storage 2015-12-09 01:18:15 +01:00
09afbb0e12 change implementation technique: use flags instead of exceptions
abandon the use of an assertion exception to signal match failure,
rather use a final bool conversion to retrieve the results.

Error messages are now delivered by side effect into STDERR


The reason is we're unable to deliver the desisred behaviour
with the chosen DSL syntax in C++ ; on a second thought the
new approach is even better aligned with the overall way
we're writing tests in Lumiera. And we produce match-trace
messages to indicate the complete matching path now
2015-12-08 03:20:52 +01:00
00df7ff477 draft behaviour of helper for negated machtes 2015-12-07 23:47:07 +01:00
272d62d5a3 log handling const correctness
adding log entries requires full access,
whereas matching log entries is const,
since it doesn't alter the log
2015-12-06 04:37:41 +01:00
ef1b640ffb adapt API to the workings of log joining (as defined/planned)
indeed I flipped the meaning, with respect to the previous plan.
It seems more natural to "join this into another log"
2015-12-06 04:30:39 +01:00
a95f9a6cac draft how "log joining" shall work 2015-12-06 04:21:35 +01:00
c9d113be87 EventLog: implement match backwards
..based on the new IterCursor, which gives us the ability
to switch the iteration direction
2015-12-06 03:35:07 +01:00
eb208ea145 direction switching iterator unit test PASS 2015-12-06 02:28:47 +01:00
f9c0c4c3d0 WIP: draft a direction switching iterator
...we need that to allow matching backwards in the EventLog
2015-12-06 00:10:27 +01:00
5874b1b4dc change lib::Record string representation to handle empty parts better
...no need to enclose empty sections when there are no
attributes or no children. Makes test code way more readable.



TestEventLog_test PASS as far as implemented
2015-12-05 03:57:11 +01:00
6659a7dee1 augment extensible filter to add the obvious variations
that is
 - allow also for a disjunctive extension
 - allow for negated conditions
 - allow to flip the current condition

unit test PASS
2015-12-05 02:00:44 +01:00
075653a815 define the expected behaviour for an extensible filter iterator 2015-12-05 00:52:45 +01:00
68dd8a9e03 refine implementation draft: make FilterIter extensible on-the-fly
after looking into our various iterator tools,
it seems obvious that our filtering iterator implementation
has almost all of the required behaviour; we only need to
add a hook to rewrite and extend the filtering functor,
which can now nicely done with a lambda closure.

This means all memory management, if necessary, is
pushed into std::function and the automated memory
management for closures provided by the runtime.
2015-12-05 00:28:07 +01:00
d38b28da5b implement initial EventLog entry 2015-12-02 01:31:37 +01:00
b2542b86f7 stub and rectify interfaces defined thus far.
...compilation PASS again
2015-11-28 23:50:56 +01:00
d4c017fa73 WIP: settle on the Tangible interface 2015-11-28 21:43:09 +01:00
9af20b7cf6 WIP: BusTerm needs to be a concrete class
...providing the standard implementation of UI-Bus connectivity.
It seems reasonable to place all of the UI-Bus implementation into
a single translation unit
2015-11-28 20:55:28 +01:00