Use the new AttributeMap and Changeset APIs

This commit is contained in:
Richard Hansen 2021-11-28 23:39:15 -05:00
parent f00b1ae89b
commit a02e45499d
3 changed files with 6 additions and 31 deletions

View file

@ -346,9 +346,7 @@ describe(__filename, function () {
// numbers do not change if the attribute processing code changes.)
for (const attrib of knownAttribs) apool.putAttrib(attrib);
for (const aline of tc.wantAlines) {
const opIter = Changeset.opIterator(aline);
while (opIter.hasNext()) {
const op = opIter.next();
for (const op of Changeset.deserializeOps(aline)) {
for (const n of attributes.decodeAttribString(op.attribs)) {
assert(n < knownAttribs.length);
}
@ -375,9 +373,7 @@ describe(__filename, function () {
gotAttribs.push(gotAlineAttribs);
const wantAlineAttribs = [];
wantAttribs.push(wantAlineAttribs);
const opIter = Changeset.opIterator(aline);
while (opIter.hasNext()) {
const op = opIter.next();
for (const op of Changeset.deserializeOps(aline)) {
const gotOpAttribs = [...attributes.attribsFromString(op.attribs, apool)];
gotAlineAttribs.push(gotOpAttribs);
wantAlineAttribs.push(attributes.sort([...gotOpAttribs]));