Commit graph

1453 commits

Author SHA1 Message Date
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
4e5b1901a1 Solution for #948 : special treatment for the test-suite
Note: this changeset globally sets the linkerflag --as-needed
but adds a single, hard coded exception to this rule for
taget/test-suite
2014-09-30 04:40:24 +02:00
Ichthyostega
9945351ab2 Jessie(#946) & Clang(#928) compatibility: fix too narrow test definition
Clang evaluates expressions in different order. While in GCC, the exception
happens at the begin, in Clang the first terms have been already printed.
2014-09-26 02:36:36 +02:00
Ichthyostega
f1a6fca4cd fix too narrow test definition for IterAdapterSTL_test
here we're iterating hash table based collections, consequently
the order of items retrieved *is* implementation dependent and indeed
differs on different platforms and compilers.
2014-09-26 02:24:01 +02:00
7492e7ffce Fix initialisation order problem, triggered in Clang (#928)
In Clang, static object fields are initialised from top to bottom,
but before any other variables in anoymous namespaces. To the contrary,
GCC evaluates *any* initialisation expression in the translation
unit together from top to bottom. Thus, in the clang generated
code, in two cases the static initialisation could use a not yet
constructed local lib::_Fmt formatter object.
2014-09-25 02:50:02 +02:00
059dbd8c75 fix and finish the diagnostics helper
there was still a subtle bug in this helper.
testing your own test fixture is sometimes a good idea ;-)
2014-09-23 03:37:28 +02:00
4145452397 factor out a diagnostics helper for variadic templates
a nice offspring of this investigation
2014-09-22 03:37:07 +02:00
d064623bab Reworked MultiFact(#388): switch in the new implementation 2014-09-14 23:58:05 +02:00
591e6d9775 MultiFact: implement the last and most complex usage case
the use of a custom finisihing functor, which is applied
to any generated product. This can be used for registration,
memory management or similar framework aspects
2014-09-14 22:25:12 +02:00
932d49fd95 MultiFact: how I learned to love the Bomb
C++11 is just incredibly cool. It is so easy to
support a flexible yet specific set of arguments
2014-09-14 02:06:58 +02:00
372edbfc85 MultiFact: implement second use case (smart pointers) 2014-09-14 00:36:36 +02:00
0ff5c50030 MultiFact: implement simple usage pattern. NOTE: breaks CLang 3.0
Implement the first simple usage scenario for the
unified MultiFact template, using variadic templates.

NOTE:
 - the obvious solution based on std::forward
   triggers strange behaviour in GCC-4.7
 - the inline lambda in the test case traps the
   CLang-3.0 parster with a segfault. Horay!
2014-09-13 02:50:14 +02:00
c209f2e80c WIP: draft first usage pattern of the reworked MultiFact
...this time, I am determined to get it all into a single
template, and get it clear and right.
2014-09-11 19:39:42 +02:00
a1bb9178f5 Ticket #388: start investigation of MultiFact design
needs overhaul, since current design leads to problems
with GCC 4.8 onwards (and is messed up anyway)
2014-09-11 00:10:59 +02:00
d2193e381c CLang-compatibility: temporary fix for bool conversion
...but we really neeed to re-think those bollean evaluations and conversions
2014-08-28 23:28:39 +02:00
d07bbadaaf extend the unit-test to verify usage in hashtables 2014-08-18 06:03:41 +02:00
05042d96cd document the hash bridge with a unit test 2014-08-17 08:39:46 +02:00
e35a45a65e tricky header reordering to support a hackish-workaround (#944)
right now we have to defeat an unfortunate static assertion in
the standard library, which is expected to go away in the future.
We use a hack to hijack the problematic definition with the preprocessor,
which requires our header to be first.
2014-08-17 08:03:21 +02:00
3ef6bb0482 improve readability of some test specs
..by using literal match instead of regular expression match
2014-05-12 01:37:15 +02:00
561e036e0b remove any remaining use of boost::lambda
obsolete now, we can use the lambdas of the stock language
2014-05-12 01:12:45 +02:00
c2ea15695e amend harmless PlacementIndex test failures. Test Suite PASS
c++11 uses another hashtable implementation.
This uncovered some poorly written tests, which relied on
objects being returned in a specific order. As far as poissible,
we're using generic query functions now to get our test objects.

But these tests still rely on a specifically crafted test index content,
which as such is acceptable IMHO. The only remaining problem is
that we check the order of generated output in some tests, and this
order is still implementation dependent.
2014-05-11 02:08:53 +02:00
a421cf45de adjust test spec: C++11 does indeed pass ref parameters even through function objects
This is a notable difference to the boost or tr1-function objects
we used up to now. Thus the behavour is now straight forward without
any exception. If the function takes an argument by reference,
this is replicated through bind and function expressions
2014-05-10 02:14:38 +02:00
4acb7de682 half hearted fix: order of hashmap entries is implementation dependent
a real fix would be to rewrite the test to collect the retrieved
values and do a structural verification of the results. This
would mean to write a lot of code for such a marginal topic,
which was implemented just for sake of completenes anyway.

Hopefully my lack of "motivation" doesn't backfire eventually ;-)
2014-05-09 01:45:10 +02:00
a205653cad C++ uses a more precise meaning of 'convertiblity' now
Conversion means automatic conversion. In our case,
what we need ist the ability to *construct* a bool from
our (function) object -- while functors aren't automatically
convertible to bool. Thus we use one of the new predicates
from <type_traits>
2014-05-09 00:56:31 +02:00
643dfe3ea8 fix long standing error in testsuite runner
...uncovered by switching to c++11
When invoking an individual test, we used to erase
the 0-th cmdline argument, which happens to be allways
the name of the test being invoked. Yet none of our
tests actually complied to that contract. Rather,
all tests taking arguments access them by 1-based
argument index. Previously, the argument values just
happened to be still in memory at the original location
after erasing the 0st element.

"Fixed" that by changing the contract. Now, the 0th argument
remains in place, but when there are no additional arguments,
the whole cmdline is cleared.
This is messy, but the test runer needs to be rewritten
entirely, the whole API is clumsy and dangerous. Ticket #289
2014-05-09 00:56:31 +02:00
a4c41d1c12 testrunner: handle help request properly
don't actually execute the tests when there was a --help
2014-05-05 22:59:23 +02:00
f826ab1ee5 C++11 transition: get compilation to pass again
...but we have still 12 test failures
2014-04-28 01:34:03 +02:00
2e9467fe76 Ticket #942: introduce move semantics for our custom shared-ptr-wrapper lib::P 2014-04-28 01:06:40 +02:00
761bab5647 C++11 transition fixes
- comparison of weak-pointers
2014-04-05 22:20:38 +02:00
7be1b7d35d Switch from TR1 preveiw to the new standard headers
- functional
- memory
- unordered collections
2014-04-03 22:42:48 +02:00
5be52d4a55 Ticket #925: remove LUID from interface/plugin specifications
In the November developer meeting, Christian and I agreed that
it's best to remove that offending LUID specifications altogether.

Those embedded LUIDs where one of the issues blocking the transition to C++11
2014-03-16 02:21:07 +01:00
5fa4667fb8 fix error in test fixture
random offset should always be != zero
2014-03-16 02:00:01 +01:00
4ef1883c04 settle and implement some long standing concerns regarding #920
- what the dispatch operation actally is
- where the deadlines are established
2013-11-18 02:25:27 +01:00
a640283e4c introduce typedef for Frame numbers (see #882) 2013-11-18 00:01:43 +01:00
608ae3efd8 continue development where we left before the release effort 2013-11-17 23:05:15 +01:00
62ae422fcc bugfix: occasional wrap-around on 32bit FSecs value in test code
this is rather a workaround.
The problem is a wraparound while calculating the common denominator in

Time rawTime (dirt + frames*F25);

Currently we're using boost_rational<long>, and long is only 32bit
on 32bit platforms. The workaround commited here just avoids
the calculation of the fractional value, and adds 64bit time values
instead. But the real solution would be to use a consistent
approach for dealing with frame counts and frame rates, all
based on 64bit values. See Ticket #939
2013-11-10 04:17:53 +01:00
4da923696b partial fix: use 64 framecounts (Ticket #882)
This is a partial and preliminary fix; we had an occasional
numeric overflow on 32bit platforms in some tests.

The complete fix will be to introduce a typedef and then
rework the relevant APIs (which are preliminary anyway,
thus no urge right now)
2013-11-10 04:14:39 +01:00
3ffc27eee0 bugfix: format-string for long and ulong values
our front-end for boost::format, the class lib::_Fmt
was lacking an reliable  specialisation for long and ulong.

This is due to the notorious problem of these types being
of platform dependant size. As a fix, we're speclialising
explicitly for int16_t, int32_t and int64_t and avoid the
common names 'short', 'int' and 'long' alltogether.

And especially for non-64bit-platform (NONPORTABLE)
we add an explicit specialisation for long
2013-11-10 04:14:22 +01:00
8defe47507 Debian/Policy 3.9.x : enforce strict dependencies on dynamic modules
The recommendation is to use the link flag --no-undefined
and to fed *all* dependencies to the respective link step.

This changeset enables this strict linking of dependencies.
It turned out that our dependencies were already sane
(with the sole exception of a direct dependency to X-Lib
in the XV viewer widget)
2013-11-03 00:07:17 +01:00
888099466f release prep: remove defunct autotools buildsystem 2013-10-29 03:47:50 +01:00
6822a9e2fb DOC: reorganise the Doxygen configuration and structure
- upgrade the configuration to a current version
- provide a frontpage with cross-links to other documentation
- define a set of modules; relevant classes and files can be
  added to these, to create a exploration path for new readers
- fix a lot of errors in documentation comments
- use a custom configuration for the documentation pages
- tweak the navigation, the sections and further arrangements
2013-10-25 06:34:38 +02:00
974c670d41 fix **** in doxygen comments
to make them stand out more prominently, some entity comments
where started with a line of starts. Unfortunately, doxygen
(and javadoc) only recogise comments which are started exactly
with /**

This caused quite some comments to be ignored by doxygen.
Credits to Hendrik Boom for spotting this problem!

A workaround is to end the line of stars with *//**
2013-10-24 23:06:36 +02:00
d0f195d8c2 remove superfluous shutdown of config-system
...startup and shutdown happen automatically through ConfigFacade.
2013-10-21 03:03:16 +02:00
52c83b860b DependencyFactory: remove the ability to restart a service explicitly
We don't need this ability and it pushes us into using a
central registry. This solution turned out to be problematic
when loading dynamic libraries (plug-ins).
2013-10-21 02:06:01 +02:00
a344604f1b Clang(#928): adjustments regarding scope and visibility
Clang doesn't allow to declare a private nested class as friend.
This is unfortunate, but likely correct to the letter of the standard.

As a workaround, now we're creating the instances within a static
function of DependencyFactory -- in the end this improves readability


A second issue fixed with this changeset is the scope of the
marker function. Clang is right, this isn't ADL, thus an inline
friend definition is simply not visible outside the class.
2013-10-20 21:51:28 +02:00
bfba22f41a move test mock support into separate header. Write comments (closes #934) 2013-10-20 03:48:23 +02:00
0ea37402d2 Ticket #934: switch entire code-base to use the new Singleton factory
lib::Depend<TY>  works as drop-in replacement for lib::Singleton<TY>

This changeset removes the convoluted special cases like
SingletonSub and MockInjector.
2013-10-20 03:19:36 +02:00
b225120d09 reworkted Singleton / DependencyFactory unit test pass 2013-10-20 00:34:21 +02:00
739a473f7e implemented the standard code path of DependencyFactory
still mising: a mechanism to inject mock objects temporarily
2013-10-19 03:32:49 +02:00