53 ATTRIB2(
"β", int64_t(2)),
59 CHILD_T(
Time(12,34,56,78)),
61 ATTRIB_NODE =
MakeRec().genNode(
"δ"),
62 CHILD_NODE = SUB_NODE;
113 return snapshot({ins(TYPE_X)
134 GenNode childA_upper(CHILD_A.idi.getSym(),
"A");
169 Rec& subject = target;
173 application.consume (populationDiff());
175 CHECK (!isnil (subject));
176 CHECK (
"X" == subject.getType());
177 CHECK (1 == subject.get(
"α").data.get<
int>());
178 CHECK (2L == subject.get(
"β").data.get<int64_t>());
179 CHECK (3.45 == subject.get(
"γ").data.get<
double>());
180 auto scope = subject.scope();
181 CHECK ( *scope == CHILD_A);
182 CHECK (*++scope == CHILD_T);
183 CHECK (*++scope == CHILD_T);
184 CHECK (*++scope ==
MakeRec().appendChild(CHILD_B)
185 .appendChild(CHILD_A)
186 .genNode(SUB_NODE.idi.getSym()));
187 CHECK (isnil(++scope));
190 application.consume (mutationDiff());
191 CHECK (join (subject.keys()) ==
"α, β, γ");
192 scope = subject.scope();
193 CHECK ( *scope == CHILD_T);
194 CHECK (*++scope == CHILD_A);
195 Rec nested = (++scope)->data.get<
Rec>();
196 CHECK (nested.get(
"γ").data.get<
double>() == 3.45);
197 CHECK (nested.get(
"δ") ==
MakeRec().appendChild(CHILD_A)
198 .appendChild(CHILD_A)
199 .appendChild(CHILD_A)
201 auto subScope = nested.scope();
202 CHECK ( *subScope != CHILD_A);
203 CHECK (CHILD_A.idi == subScope->idi);
204 CHECK (
"A" == subScope->data.get<
string>());
205 CHECK (*++subScope ==
MakeRec().type(
"Y")
206 .
set(
"β", int64_t(2))
207 .genNode(CHILD_NODE.idi.getSym()));
208 CHECK (*++subScope == CHILD_T);
209 CHECK (isnil (++subScope));
210 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_"
Simplistic 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.