lumiera_/tests/library
Ichthyostega 92bc044e9e Library: consider how to handle randomness in tests
Using random or pseudo-random numbers as input for tests
can be a very effective tool to spot unintended behaviour in
corner cases, and also helps writing more principled test verifications.
However, investigating failures in randomised tests can be challenging.

A well-proven solution is to exploit the **determinism** of pseudo-random-numbers
by documenting a randomly generated seed, that can be re-injected for investigation.

Up to now, most tests rely on the old library function `rand()`, while
at some places already the C++ standard framework for random number generation
is used, packaged into a custom wrapper. Adding adequate support for
documented seed values seems to be easy to achieve, after switching
existing usages of `rand()` to a suitable drop-in replacement.

After some consideration, I decided ''against'' wiring random generator instances
explicitly, while allowing to do so on occasion, when necessary. Thus
the planned seeding mechanism will rather re-seed a ''implicit default''
generator, which could then be used to construct explicit generator instances
when required (e.g. for multithreaded tests)

As a starting point, this changeset replaces the `randomise()` API call
by a direct access to the ''reseeding functionality'' exposed by the
C++ framework and all default generators. Since we already provide a
dedicated static instance of the plattform entropy source, re-randomisation
can be achieved by seeding from there.

NOTE: there was extended debate in the net, questioning the viability
of the `std::random_seq` -- these arguments, while valid from a theoretical
point of view, seem rather moot when placed into a practical context,
where even 2^32 different generation-paths(cycles) are more than enough
to provide sufficient diffusion of results (unless the goal is really to
engage into Monte-Carlo simulations for scientific research or large model
simulations).

Notable most of the more catchy reprovals raised by Melissa O'Neill
have been refuted by experts of the field, even while being still propagated
at various places in the net, often combined with promoting PCG-Random.
2024-11-10 03:25:45 +01:00
..
advice Library: allow to check if Advice was explicitly given 2019-07-13 17:00:23 +02:00
c-lib Library/Application: complete technology switch (closes #1279) 2023-10-16 01:44:04 +02:00
diff Library: introduce compact textual representation for GenNode 2024-03-28 03:14:21 +01:00
idi Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
meta Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
query Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
stat Scheduler-test: settle definition of specific test setup and data 2024-04-08 03:58:15 +02:00
test Library: investigate discrepancy in allocator 2024-06-18 17:20:23 +02:00
allocation-cluster-test.cpp Library: AllocationCluster and SeveralBuilder logic tweaks 2024-06-19 15:45:12 +02:00
app-config-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
builder-qualifier-support-test.cpp Job-Planning: switch to processing references 2023-05-23 01:08:05 +02:00
cmdline-wrapper-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
custom-shared-ptr-test.cpp GCC-5 compatibility: remove the last remaining auto_ptrs 2017-05-01 21:43:10 +02:00
del-stash-test.cpp reduce include dependencies of DelStash 2018-04-01 00:37:58 +02:00
DIR_INFO
exception-error-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
format-cout-test.cpp Library: define string conversion trait more precisely 2017-12-04 03:53:36 +01:00
format-helper-test.cpp Library: reorder some pervasively used includes 2024-03-21 19:57:34 +01:00
format-string-test.cpp fix failing test - boost::format is getting better 2020-02-17 03:32:43 +01:00
gnuplot-gen-test.cpp Library: customisation of the generated Gnuplot diagram 2024-04-03 19:31:00 +02:00
hash-generator-test.cpp GCC-7: minor adjustments to make the testsuite PASS again 2018-04-29 03:15:57 +02:00
hash-indexed-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
hash-standard-to-boost-bridge-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
helloworldtest.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
incidence-count-test.cpp Scheduler-test: integrate instrumentation as optional feature 2024-02-15 02:43:44 +01:00
index-iter-test.cpp Library: clarify name of index-based iterator 2024-11-09 22:43:05 +01:00
ios-savepoint-test.cpp Lib: fix a bug with diagnostic output 2022-09-27 01:51:21 +02:00
item-wrapper-test.cpp C++17: fix detector for function signatures 2020-02-21 20:16:59 +01:00
iter-adapter-stl-test.cpp Library: allow to consume an iterator while taking the snapshot 2017-08-13 07:25:32 +02:00
iter-adapter-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
iter-chain-search-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
iter-cursor-test.cpp Library: also cover the smart-ptr usage variant 2024-03-21 19:57:34 +01:00
iter-explorer-test.cpp Invocation: develop an abbreviated node spec 2024-11-05 03:56:38 +01:00
iter-queue-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
iter-source-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
iter-stack-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
itertools-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
lazy-init-test.cpp Library: improve helper to deal with self-shadowing ctor (see: #963) 2024-04-01 19:40:19 +02:00
life-cycle-test.cpp Doxygen Fixes (#1062) 2017-04-02 04:22:51 +02:00
linked-elements-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
multifact-argument-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
multifact-singleton-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
multifact-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
null-value-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
opaque-holder-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
opaque-unchecked-buffer-test.cpp Library: verify PlantingHandle's extended capabilities 2021-05-07 22:50:13 +02:00
optional-ref-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
path-array-test.cpp Library: uniform definition scheme for error-IDs 2024-03-21 19:57:34 +01:00
polymorphic-value-test.cpp Chain-Load: work out DSL for generating DOT scripts 2023-11-16 03:19:19 +01:00
query-text-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
random-draw-test.cpp Chain-Load: demonstrate use of reduction rule 2023-11-30 03:20:23 +01:00
random-test.cpp Library: consider how to handle randomness in tests 2024-11-10 03:25:45 +01:00
rational-test.cpp Library: some first thoughts regarding random number generation 2024-03-12 00:48:11 +01:00
ref-array-test.cpp Invocation: consider storage and allocation of fan-in/fan-out 2024-05-13 18:34:42 +02:00
removefromsettest.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
replaceable-item-test.cpp Job-Planning: dispose of FrameCoord in pipeline and Dispatcher interface 2023-06-18 03:50:48 +02:00
result-test.cpp Library: augment the »Either« wrapper to funciton invocation 2023-09-27 23:17:56 +02:00
scoped-collection-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
scoped-holder-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
scoped-holder-transfer-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
scoped-ptrvect-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
search-path-splitter-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
several-builder-test.cpp Invocation: adjustments to lib::Several to prepare for allocator use 2024-07-07 16:12:22 +02:00
simple-allocator-test.cpp MERGE Doxygen clean-up done during the last months 2017-04-01 23:59:00 +02:00
split-splice-test.cpp Segmentation: add test case to cover instance management 2023-05-05 01:34:41 +02:00
sub-id-test.cpp Library: reorder some pervasively used includes 2024-03-21 19:57:34 +01:00
symbol-hashtable-test.cpp MERGE Doxygen clean-up done during the last months 2017-04-01 23:59:00 +02:00
symbol-test.cpp Chain-Load: draft usage for Scheduler testing 2023-12-04 00:34:06 +01:00
sync-barrier-performance-test.cpp Library/Application: consolidate Monitor API and usage 2023-10-15 20:42:55 +02:00
sync-barrier-test.cpp Library/Application: switch Microbenchmark + SyncBarrier tests 2023-10-03 22:56:09 +02:00
sync-classlock-test.cpp Library/Application: consolidate Monitor API and usage 2023-10-15 20:42:55 +02:00
sync-locking-test.cpp Library/Application: complete technology switch (closes #1279) 2023-10-16 01:44:04 +02:00
sync-timedwait-test.cpp Library/Application: consolidate Monitor API and usage 2023-10-15 20:42:55 +02:00
sync-waiting-test.cpp Library/Application: consolidate Monitor API and usage 2023-10-15 20:42:55 +02:00
text-template-test.cpp Library: complete ETD data-source binding and test (closes #1359) 2024-03-28 03:18:02 +01:00
thread-wrapper-autonomous-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
thread-wrapper-join-test.cpp Library: complete and modernise ThreadWrapperJoin_test 2023-09-29 23:42:22 +02:00
thread-wrapper-lifecycle-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
thread-wrapper-self-recognition-test.cpp Library: verify thread self-recognition 2023-09-30 00:10:09 +02:00
thread-wrapper-test.cpp Library/Application: switch Microbenchmark + SyncBarrier tests 2023-10-03 22:56:09 +02:00
typed-allocation-manager-test.cpp MERGE Doxygen clean-up done during the last months 2017-04-01 23:59:00 +02:00
unique-malloc-owner-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
util-collection-test.cpp Library: integrate generic min/max function 2020-03-08 02:05:39 +01:00
util-floordiv-test.cpp Doxygen Fixes (#1062) 2017-04-02 04:22:51 +02:00
util-floorwrap-test.cpp Doxygen Fixes (#1062) 2017-04-02 04:22:51 +02:00
util-foreach-test.cpp Library: draft a SyncBarrier latch 2023-09-22 21:55:53 +02:00
util-parse-bool-test.cpp Util: use case-insensitive matching for parsing bool values 2021-08-20 14:33:59 +02:00
util-sanitised-identifier-test.cpp Library: new thread-wrapper implementation complete 2023-09-26 02:32:48 +02:00
util-tuple-test.cpp Library: extract helper for unloading a sequence into a tuple 2023-05-10 14:49:51 +02:00
variant-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
vector-transfer-test.cpp Library: reorganise test helpers and cover logging tracker object 2024-06-16 04:22:29 +02:00
verb-function-dispatch-test.cpp Library: complete test coverage of VerbPack 2019-06-11 02:40:20 +02:00
verb-visitor-dispatch-test.cpp the new design takes the old name 2023-06-22 20:23:55 +02:00