62 ATTRIB2(
"β", int64_t(2)),
68 CHILD_T(
Time(12,34,56,78)),
70 ATTRIB_NODE =
MakeRec().genNode(
"δ"),
71 CHILD_NODE = SUB_NODE;
122 return snapshot({ins(TYPE_X)
143 GenNode childA_upper(CHILD_A.idi.getSym(),
"A");
178 Rec& subject = target;
182 application.consume (populationDiff());
184 CHECK (!isnil (subject));
185 CHECK (
"X" == subject.getType());
186 CHECK (1 == subject.get(
"α").data.get<
int>());
187 CHECK (2L == subject.get(
"β").data.get<int64_t>());
188 CHECK (3.45 == subject.get(
"γ").data.get<
double>());
189 auto scope = subject.scope();
190 CHECK ( *scope == CHILD_A);
191 CHECK (*++scope == CHILD_T);
192 CHECK (*++scope == CHILD_T);
193 CHECK (*++scope ==
MakeRec().appendChild(CHILD_B)
194 .appendChild(CHILD_A)
195 .genNode(SUB_NODE.idi.getSym()));
196 CHECK (isnil(++scope));
199 application.consume (mutationDiff());
200 CHECK (join (subject.keys()) ==
"α, β, γ");
201 scope = subject.scope();
202 CHECK ( *scope == CHILD_T);
203 CHECK (*++scope == CHILD_A);
204 Rec nested = (++scope)->data.get<
Rec>();
205 CHECK (nested.get(
"γ").data.get<
double>() == 3.45);
206 CHECK (nested.get(
"δ") ==
MakeRec().appendChild(CHILD_A)
207 .appendChild(CHILD_A)
208 .appendChild(CHILD_A)
210 auto subScope = nested.scope();
211 CHECK ( *subScope != CHILD_A);
212 CHECK (CHILD_A.idi == subScope->idi);
213 CHECK (
"A" == subScope->data.get<
string>());
214 CHECK (*++subScope ==
MakeRec().type(
"Y")
215 .
set(
"β", int64_t(2))
216 .genNode(CHILD_NODE.idi.getSym()));
217 CHECK (*++subScope == CHILD_T);
218 CHECK (isnil (++subScope));
219 CHECK (isnil (++scope));
Concrete implementation to apply structural changes to hierarchical data structures.
iter_stl::IterSnapshot< VAL > snapshot(std::initializer_list< VAL > const &&ili)
Take a snapshot of the given std::initializer_list.
Implementation namespace for support and library code.
Lumiera's internal time value datatype.
static const Ref END
symbolic ID ref "_END_"
Simple test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
static const Ref ATTRIBS
symbolic ID ref "_ATTRIBS_"
materialised iterator contents.
Preconfigured adapters for some STL container standard usage situations.
a family of time value like entities and their relationships.
object-like record of data.
generic data element node within a tree
generic builder to apply a diff description to a given target data structure.