Lumiera  0.pre.03
»edit your freedom«
GenericRecord_test Class Reference

Description

Test:
Verify properties of a special collection type meant for external representation of object-like data, especially for symbolic representation in diff messages.
  • there is a type meta attribute
  • a Record can have attributes (by key) and contents (ordered list of values)
  • various kinds of iterators are provided
  • besides the regular constructor, which explicitly takes a type, a collection of attributes, and a collection of contents, there is a convenience constructor especially for literal notation and data definition. This one figures out the break between attributes and contents automatically; a type meta attribute is recognised and the first element without a given key or ID ends the attributes and starts the content scope
  • Record elements are conceived as values and equality is defined in terms of their contents, including the order (no normalisation, no sorting)
  • they are immutable after construction. But we provide a Mutator for remoulding a given element, enabling object builder notation.
  • a reference wrapper for handling of large structures is provided.
    Remarks
    this test uses the specialisation Record<string> solely, to cover the basic properties and behaviour, while leaving out the complexities of specific payload data types. For the actual use case, the symbolic description of data structure differences, we use a specific "value" within Record, the diff::GenNode, which is a limited typesafe Variant element, and in turn allows Record<GenNode> as embedded payload. Effectively this creates a "recursive data type", which is key to typesafe functional processing of unlimited data structures. The design of diff::Record only makes sense with this use case in mind; most notably, we have the keys (attribute names) embedded within the value payload, which turns attributes into just another content scope with special access operations. This also explains, why we do not normalise the content in any way; content is meant to reflect other data structures, which are normalised and maintained by their owner.
    See also
    GenNode_test
    tree-diff.cpp

Definition at line 127 of file generic-record-test.cpp.

Private Member Functions

void copy_and_move ()
 
void equality ()
 
virtual void run (Arg)
 
void simpleUsage ()
 
void verifyCreation ()
 
void verifyMutations ()
 
void wrapRef ()
 
+ Inheritance diagram for GenericRecord_test:
+ Collaboration diagram for GenericRecord_test:

The documentation for this class was generated from the following file: