53 ATTRIB2(
"β", int64_t(2)),
59 CHILD_T(
Time(12,34,56,78)),
113 return snapshot({ins(TYPE_X)
169 Rec& subject = target;
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)
187 CHECK (isnil(++scope));
191 CHECK (join (subject.
keys()) ==
"α, β, γ");
192 scope = subject.
scope();
193 CHECK ( *scope == CHILD_T);
194 CHECK (*++scope == CHILD_A);
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))
208 CHECK (*++subScope == CHILD_T);
209 CHECK (isnil (++subScope));
210 CHECK (isnil (++scope));
generic builder to apply a diff description to a given target data structure.
void consume(DIFF &&diff)
object-like record of data.
Access get(string key) const
iter_stl::IterSnapshot< DiffStep > DiffSeq
string const & getSym() const
materialised iterator contents.
Lumiera's internal time value datatype.
Preconfigured adapters for some STL container standard usage situations.
const GenNode TYPE_Y("type", "Y")
ContentSnapshot< CON > snapshot(CON const &con)
Take a snapshot of the given STL compliant container.
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
string join(COLL &&coll, string const &delim=", ")
enumerate a collection's contents, separated by delimiter.
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
generic data element node within a tree
static const Ref END
symbolic ID ref "_END_"
static const Ref ATTRIBS
symbolic ID ref "_ATTRIBS_"
a family of time value like entities and their relationships.
Concrete implementation to apply structural changes to hierarchical data structures.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...