diff --git a/tests/library/diff/tree-mutator-binding-test.cpp b/tests/library/diff/tree-mutator-binding-test.cpp index 6969adf6c..f304850b6 100644 --- a/tests/library/diff/tree-mutator-binding-test.cpp +++ b/tests/library/diff/tree-mutator-binding-test.cpp @@ -590,7 +590,7 @@ namespace test{ // This code might be confusing, because in fact we're playing two roles here! // For one, above, in the definition of mutator3 and in the declaration of MapD subScopes, // the test code represents what a private data structure and binding would do. - // But below we enact the TreeDiffAplicattor, which *would* use the Mutator interface + // But below we enact the TreeDiffAplicator, which *would* use the Mutator interface // to talk to an otherwise opaque nested mutator implementation. Actually, here this // nested opaque mutator is created on-the-fly, embedded within the .buildChildMutator(..lambda...) // Incidentally, we "just happen to know" how large the buffer needs to be to hold that mutator, @@ -824,68 +824,40 @@ namespace test{ // --- third round: mutate data and sub-scopes --- -#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #992 - // This time we build the Mutator bindings in a way to allow mutation - // For one, "mutation" means to assign a changed value to a simple node / attribute. - // And beyond that, mutation entails to open a nested scope and delve into that recursively. - // Here, as this is really just a test and demonstration, we implement those nested scopes aside - // managed within a map and keyed by the sub node's ID. + // This third part of the test covers the actual purpose of attribute binding: + // the ability to assign values or even to open a sub-scope to recurse into + // a nested object stored within a data field. auto mutator3 = TreeMutator::build() - .attach (collection(target) - .constructFrom ([&](GenNode const& spec) -> Data - { - cout << "constructor invoked on "< bool - { - cout << "match? "< bool - { - cout << "assign "< bool - { - // use our "inside knowledge" to get at the nested scope implementation - VecD& subScope = subScopes[subID]; - buff.create ( - TreeMutator::build() - .attach (collection(subScope) - .constructFrom ([&](GenNode const& spec) -> Data - { - cout << "SubScope| constructor invoked on "<