Commit graph

20 commits

Author SHA1 Message Date
aecef2a8f4 Commands: refactor integration into SessionCommandService (#1089)
It seems more adequate to push the somewhat intricate mechanics
for the "fall back" onto generic commands down into the implementation
level of CommandInstanceManager. The point is, we know the standard
usage situation is to rely on the instance manager, and thus we want
to avoid redundant table lookups, only to support the rare case of
fallback to global commands. The latter is currently used only from
unit-tests, but might in future also be used by scripts.

Due to thread safety considerations, I have refrained from handing
out a direct reference to the command token sitting in the registry,
even while not doing so incurs a small runtime penalty (accessing
the shared ref-count for creating a copy of the smart-handle).
This is the typical situation where you'd be tempted to sacrifice
sanity for the sake of an imaginary performance benefit, which
in fact is dwarfed by all the machinery of UI-Bus and argument
passing via GenNode.
2017-04-09 19:11:40 +02:00
afe07bdb16 decommission the safe-bool-idiom (closes #477)
obsoleted by C++11

 * in most cases, it can be replaced by an explicit conversion operator
 * especially for the Lumiera Forward Iterators, we need an implicit conversion
2017-04-02 06:42:23 +02:00
9a0b72e8ca Function-Tools: include the investigation code as unit test
...since there is not any test coverage for this trait, which
turned out to be quite deeply rooted in the system by now and
handles several rather subtle special cases
2017-03-19 02:29:39 +01:00
3395d002bd Library: helper to produce threadsafe member-IDs for a family of objects
This is a little bit of functionality needed again and again;
first I thought to use the TypedCounter, but this would be overkill,
since we do not actually need different instances, and we do not need
to select by type when incrementing the counter. In fact, we do not
even need anything beyond just allocating a number.

So I made a new class, which can be used RAII style
2017-01-14 03:07:48 +01:00
2a6e48d7b5 immutable-arguments(#989): verify the tuple builder can handle those too
incidentally, this uncovered yet another unwanted narrowing conversion,
namely from double via gavl_time_t to TimeValue or alternatively
from double via FSecs (= rational<long>) to Duration.

As in all the previos cases, actually the compiler is to blame,
and GCC-5 is known to get that one right, i.e. let the SFINAE fail
instead of passing it with a "narrowing conversion" warning.



Note: the real test for command binding with immutable types
can be found in BusTerm_test
2016-02-07 02:20:01 +01:00
8a33048cc7 simple number range iterator
very similar to boost::irange, but without heavyweight boost
includes, and moreover based on our Lumiera Forward Iterator concept

Such a inline-range construct makes writing simple tests easy
2016-02-04 22:01:48 +01:00
fc193da1ac unit-test for tuple initialisation from GenNode
- leave out the type conversion part
- instead verify error handling on some typical corner cases
2016-01-28 22:39:38 +01:00
f2cbac14e2 test-suite: fix lots of missing return value checks
without that check, in theory our test runner will tolerate
a non-zero return value, like throwing or failing an assert,
which is not what we want....

guess these happenend to get in by forgetting to
add this check when switching a test from PLANNED to TEST
2016-01-28 22:30:24 +01:00
47ce7ad96b research finished: build a (compiletime) tuple from runtime sequence
...should document this by a unit-test
2016-01-28 15:37:35 +01:00
297f986b5f now able to remove our old Tuple type (closes #988)
all unit-tests PASS again
2016-01-20 01:25:40 +01:00
f6d04d4d02 refactoring(#988): switch correspoinging tests to std::tuple
...with this changeset, our own tuple type should be
basically disconnected and not used anymore
2016-01-19 23:53:20 +01:00
ecd1375e92 fix and adjust broken test defintions. Closes #985 2016-01-10 12:25:45 +01:00
88120eba1a unit-test(#985): define more tests 2016-01-09 22:23:50 +01:00
034d5f99dc fix and adjust various test fixtures
due to the new automatic string conversion in operator<<
the representation of objects has changed occasionally.

I've investigated and verified all those incidents.
2016-01-08 00:16:14 +01:00
eb208ea145 direction switching iterator unit test PASS 2015-12-06 02:28:47 +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
de50bf7c91 virtual copy support documented and covered with unit test 2015-04-20 03:41:28 +02:00
2d0671beff reduce the load of some tests
...since they cause out of memory from time to time
2014-10-18 05:09:18 +02:00
aa17106c41 link tests with stringent application scope dependencies (closes #938)
- the tests covering threadind support and object monitors
  are located in the backend test-library and linked against liblumierabackend.so
- some fundamental facilities of proc-layer moved from the library tree
  into the basic components tree, since *testing* them requires at least
  to link against liblumieracommon.so
2014-10-17 21:15:59 +02:00
7c9ab5fba2 reorganise test suite compartments
this change is prerequisite to allow linking against different scopes (#938)
2014-10-17 20:02:25 +02:00