Commit graph

1702 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
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
ae7912dc99 refactoring: move new library helpers into final destination 2016-01-28 15:19:09 +01:00
f743784bc9 add accessor for Nth child to our Record type 2016-01-23 17:10:44 +01:00
16597fcd99 extend command API to also accept a lib::diff::Rec<GenNode> for arguments
WIP: have to decide how the arguments can be unpacked
and how to generate proper runtime type mismatch errors.
2016-01-22 20:29:45 +01:00
1dc9642ec4 draft implementation of diagnostic command handler 2016-01-22 19:44:17 +01:00
cc310521a3 verify ability to use custom command handlers
...we're going to need this to implement a
dummy command handler in the test-nexus
2016-01-22 17:17:31 +01:00
005e665c13 clean-up design of the command handling patterns (#210)
this was a classical example of a muddled and messed-up design,
driven just by the fact that I wanted to "spare" some functions,
with the net effect of writing more functions, plus a proxy class
plus create a lot of confusion for the reader.

This was easy to resolve though, once I resorted to the
general adivice to make public interface methods final,
make the extension ponts protected and never
to chain two extension points
2016-01-22 15:25:08 +01:00
eaa12499f3 back to UI command invocation: basically implement a placeholder command
based on the previous experiments, this adds a fake operation
and a definition frame to hook this operation as pseudo Proc-Layer command

WIP: the invocation itself is not yet implemented.
     We need to build a custom invocation pattern for that,
     in order to be able to capture the instance-ID of the command
     on invocation

NOTE: also, because of #989, we can not bind a time value for this test
2016-01-22 12:19:25 +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
0e10ef09ec refactoring(#988): switch command framework to std::tuple
this was rather easy, since the stadard tuple is a drop-in replacement,
and we do nothing special here, beyond inheriting from a tuple type
2016-01-19 03:56:54 +01:00
3523b897c2 refactoring(#988): disentangle Tuple metafunctions
we made double use of our Tuple type, not only as a
generic record, but also as a metaprogramming helper.

This changeset replaces these helpers with other
metafunctions available for our typelists or type sequences

(with the exception of code directly related to Tuple itself,
since the intention is to delete this code alltogether shortly)
2016-01-17 00:19:10 +01:00
627b11dcb7 stub the new functions 2016-01-15 04:57:49 +01:00
b2e0c8fa63 WIP: draft a test to verify the bus side of UI command invocation
basically this comes down to provide some convenience fixture
within the test::Nexus, which automatically generates and wires
mock commands.

Not sure if this is even possible to the extent envisioned here
2016-01-15 04:30:43 +01:00
0b21eeae2f extend unit test verification on UI command invocation 2016-01-15 02:29:33 +01:00
5a5beebd15 marcro to indicate current test function on STDOUT
since our test.sh runner can be used to verify the
expected output printed by tests, working with these
output transcripts of larger tests can be hard at times.

These separators help to find who produced which output
and they prevent a regexp match to grep beyond the feed
of a single function (which can be a common problem
when using the self-diagnostic output of the facility
currently in test, which obviously will be similar
on any data printed.
2016-01-15 01:44:35 +01:00
de71baccc3 use a inline command handler to actually invoke. Unit test PASS
Wow!
This innocuous little commit integrates several subsystems for the first time

And all worked right away!
2016-01-12 02:59:16 +01:00
a5ca8ed3b1 ...and back to #975 : draft command invocation on UI elements
First part is to define the steps (the protocol) at the
model element level, which gets a command prepared and invoked.

Test fails still, because there is no actual argument binding
invoked in the TestNexus
2016-01-12 02:14:06 +01:00
30362c59bc improve a shaky test definition
we deleted an object on the heap,
and afterwards re-accessed the memory through the
dangling pointer to verify the deletion actually happened.

This works most of the time, unless the memory manager decides
to map that page differently -- in which case we just hit
random memory contents.

A better idea is thus to place this TestFrame object
into a statically allocated buffer and invoke the dtor
explicitly. This allows us to conduct the test reliably.
2016-01-10 12:33:47 +01:00
ecd1375e92 fix and adjust broken test defintions. Closes #985 2016-01-10 12:25:45 +01:00
e518a19435 wrap-up(#985): resolve various leftovers
- replace remaining usages of typeid(T).name()
- add another type simplification to handle the STL map allocator
- clean-up usage in lib/format-string
- complete the unit tests
- fix some more bugs
2016-01-10 11:21:34 +01:00
b56f5a8945 type-display(#985): improvements and supplements
- a regexp based function to discard non-identifier chars
- nice human readable display of boolean values
2016-01-10 03:59:01 +01:00
21c02e3015 type-display(#985): implement extractor for simple type designator
using a heuristic approach on a merely lexical level
2016-01-10 02:02:18 +01:00
08c3d5d4c5 type-display(#985): implement better simplification scheme
use a regexp to scan for some known obnoxious prefixes
2016-01-10 00:31:13 +01:00
88120eba1a unit-test(#985): define more tests 2016-01-09 22:23:50 +01:00
3672873ae6 unit-test(#985): preserve this problem solution as unit test
This clean-up action for Ticket #985 started out as search
for a lightweight generic solution. What is left from this
search now, after including the actual utility code into
our support library, might serve to document this new
feature for later referral
2016-01-09 22:23:50 +01:00
334f542897 clean-up(#985): remove code superseded by this rework
now finally able to remove most of the cruft from format-util.hpp
and get rid of the infamous util::str
2016-01-09 02:05:23 +01:00
615f112f5c clean-up(#985): unify various type-indicating helpers
over time, we got quite a jungle with all those
shome-me-the-type-of helper functions.

Reduced and unified all those into
- typeString : a human readable, slightly simplified full type
- typeSymbol : a single word identifier, extracted lexically from the type

note: this changeset causes a lot of tests to break,
since we're using unmangeled type-IDs pretty much everywhere now.
Beore fixing those, I'll have to implement a better simplification
scheme for the "human readable" type names....
2016-01-09 02:05:23 +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
5e16431b44 fix a long standing Heisenbug in ScopedCollection_test
...other than intended, the bomb did explode on random occasions,
with an probability of about 4% (when rr >= 96).

Btw, there was also the mistake to throw an heap allocated
object by pointer. Damn Java habits.
2016-01-08 00:10:43 +01:00
2c20d407fc mass clean-up: adapt usage of std::cout pretty much everywhere
- remove unnecessary includes
- expunge all remaining usages of boost::format
- able to leave out the expliti string(elm) in output
- drop various operator<<, since we're now picking up
  custom string conversions automatically
- delete diagnostics headers, which are now largely superfluous
- use newer helper functions occasionally

I didn't blindly change any usage of <iostream> though;
sometimes, just using the output streams right away
seems adequate.
2016-01-07 20:12:46 +01:00
0c4495a451 reorganisation(#985): move basic typeString implementation into lib::meta
- simple function to pick up the mangled type
- pretty-printing is implemented in format-obj.cpp
- also move the demangleCxx()-Function to that location,
  it starts to be used for real, outside the test framework
2016-01-05 23:34:53 +01:00
f077c14d47 compiler evolution: get rid of a gcc-4.7 workaround
our minimal compiler requirement is gcc-4.9 since the
transition to Debian/Jessie as reference system.

gcc-4.9 is known to treat SFINAE on private fields properly
2016-01-05 23:16:18 +01:00
c104e28ebf inline(#985): provide our own minimal variant of enable_if
this is a stripped-down and very leightweight variant
of the well-known enable_if metaprogramming trick.

Providing this standard variant in a header with minimal
dependencies will allow us to phase out boost inclusions
from many further headers. As a plus, our own variant
is written such as to be more conciese in usage
(no "typename" and no acces of an embedded "::type" menber)
2016-01-05 22:00:53 +01:00
ff7ac5523f clean-up(#985): tighten basic header lib/meta/util.hpp
This header shall provide only very fundamental
metaprogramming helpers, since it is included pervasively
2016-01-05 22:00:53 +01:00
d09a5846d4 basically a working solution for toString in ostream
...and learned a lot about the new type_traits on the way.

As it seems, it is not possible to get a clean error message
when passing an "object" with no custom string conversion;
instead, some overload for an rvalue-ostream kicks in.

probably I'll go for shoing a type string in these cases
2016-01-04 22:21:09 +01:00
b96fd1299d preparation(#985): purge any remaining direct uses of boost::format
now we use boost::format through our own front-end util::_Fmt
solely, which both helps to reduce compilation time and code size,
and gives us a direct string conversion, which automatically
uses any custom operator string() available on arguments.

While desirable as such, I did this conversion now, since
it allows us to get rid of boost::str, which in turn helps
to drill down any remaning uses of our own util::str
2016-01-04 01:38:04 +01:00
96ba1fc2d0 basic BusTerm lifecycle unit test PASS 2016-01-03 05:32:05 +01:00
c9ea9de54d cover basic up-link and down-link communication in BusTerm_test 2016-01-03 03:37:52 +01:00
540151b56b provide a mock handler for commands and state marks
in the real system, this will be the task of the CoreService,
while here, in test mode, we allow to install handling closures
from the unit-test-code
2016-01-03 03:23:39 +01:00
16a70ce9f8 some coverage for string prefix/suffix helper
so I'll sleep better tonight...
2016-01-02 22:50:15 +01:00
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