Commit graph

30 commits

Author SHA1 Message Date
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
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
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
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
Hermann Vosseler
15df21ceb5 fix 32 vs 64bit problem in test
yet another instance of that obnoxious problem that "long"
is just 32bit on i386 platforms. Why the hell does such
a broken type get the preference of convenient notation??
2015-11-15 02:11:08 +01:00
d7f87c9b72 GenNodeBasic_test : do not match on random IDs
otherwise the test will fail when run within the suite....
Lovely spam!
2015-11-01 23:26:26 +01:00
34d79ee8df tree-diff-application: unit test PASS
well... this was quite a piece of work
Added some documentation, but a complete documentation,
preferably to the website, would be desirable, as would
be a more complete test covering the negative corner cases
2015-11-01 07:03:47 +01:00
2b619d6622 implement RecordContentMutator - unit test pass 2015-10-24 01:49:07 +02:00
a07eb58cef GenNodeBasic_test PASS (finally) 2015-09-25 03:12:04 +02:00
96791d4a45 fix omission in generic ID functions and add unit test
while in debugging, it turned out that the short type-prefix
was implemented in a too simplistic way; it fails on stuff
like 'lib::diff::Record<lib::diff::GenNode>'


while I must add, that the whole purpose of these ID functions
is somewhat unclear and needs to reveal itself as we move forward
2015-08-28 17:18:52 +02:00
da43d7f00f follow-up to the bugfix: just plain int is yet more readable
basically the 32/64bit problem was caused by things like 23L, which creates a long.
Unfortunately on 64bit platforms, this is aliased to int64_t,
while on 32bit i386, it is a distinct data type, but just 32bit,
like int.

The code in question here is just test / demonstration code
and actually just needs "some integer number". So let's stick
to good old boring int then.
2015-08-27 23:46:12 +02:00
46bfc0638f Generic Record: settle type handling
initially, the intention was to inject the type as a magic attribute.
But this turned out to make the implementation brittle, asymmetric
and either quite demanding, or inefficient.

The only sane approach would be to introduce a third collection,
the metadata attributes. Then it would be possible to handle these
automatically, but expose them through the iterator.

In the end I decided against it, just the type attribute
allone does not justify that effort. So now the type is an
special magic field and kept apart from any object data.
2015-08-17 06:34:51 +02:00
0cde55a67f Generic Record: finish basic implementation 2015-08-17 03:59:53 +02:00
7fcee74960 formatting helper to join a collection into a string
Ouch!
Why does C++ lack the most basic everyday stuff?
It needn't be performant. It needn't support some fancy
higher order container. Just join the f***ing strings.

use Bosst??  -- OMG!! pulls in half the metra programming library
and tries to work on any concievable range like object. Just
somehow our Lumiera Forward Iterators aren't "range-like" enough
for boost's taste.

Thus let's code up that fucking for-loop ourselves, once and forever.
2015-08-16 01:35:28 +02:00
f45884975b generalise to arbitrary acceptable attribute values
...not yet able to pick up the closure argument type automagically
however, right now we can only hypothesise this might be possible
2015-05-02 02:02:48 +02:00
2ce85a1449 use the attributeID to activate the right closure
...under the assumption that the number of attributes is small,
using just a chained sequence of inlined if-statements
"would be acceptable"
2015-05-02 01:39:58 +02:00
250a5519de TICKET 141: now we've full coverage, both for Variant and AccessCasted
Note: the new Variant implementation is a re-write from scratch
and does not rely on util::AccessCasted any more. Anyway, both
are now thoroughly covered by unit test
2015-04-26 05:55:54 +02:00
505903e71e Ticket #141 : move asside the old util::AccessCasted for rework
..existing code still uses the old version; will switch
when the new one is ready
2015-04-24 01:54:54 +02:00
5a4290d4a7 TICKET #738: re-implemented Variant functionality complete - unit test pass 2015-04-19 03:18:24 +02:00
e4a1261849 initial syntax draft
the envisioned DSL syntax for installing the binding closures
into a generic tree mutator object seems to work out
2015-04-02 03:30:20 +02:00
f5ddfa0dbe decide on the foundations of tree diff representation
- we use a GenNode element
- this holds a polymorphic value known as DataCap
- besides simple attribute values, this may hold collections of GenNode sub elements
- a special kind of GenNode collection, the Record, is used to represent objects

The purpose of this setup is to enable an external model representation
which is only loosely coupled to the interndal data representation
through the exchange of (tree)diff messages
2015-03-21 02:00:55 +01:00
80eec4132b factor out index table helper and define its contract 2015-01-04 13:23:57 +01:00
4c562e76d9 WIP: draft API for sequence change detection and diff generation 2014-12-17 02:15:15 +01:00
cb73ae2d2c concrete implementation of diff application (finished concept draft)
This implements the application of our new list diff language
to a target sequence given within a vector. Unit test pass
2014-12-11 04:46:47 +01:00
b652fb959f Implementation concept for enum-like "verb" tokens, usable as simple DSL
the intention is to use these tokens as a Diff representation
2014-11-24 05:11:03 +01:00
639fd224db Lib: helper to deal with malloced memory automatically
basically just a dressed-up std::unique_ptr
2014-11-16 04:26:12 +01: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