/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// These remain the same under LEB128 unsigned encoding if (!encoder.writeVarU32(0x0) || !encoder.writeVarU32(0x1) ||
!encoder.writeVarU32(0x42)) { returnfalse;
}
// 0x01 0x80 if (!encoder.writeVarU32(0x80)) { returnfalse;
}
// 0x03 0x80 if (!encoder.writeVarU32(0x180)) { returnfalse;
}
if (encoder.empty()) { returntrue;
} if (encoder.currentOffset() != 7) { returntrue;
}
*passed = true; returntrue;
}
CHECK(decoder.readVarU32(&value) && value == 0x0);
CHECK(decoder.readVarU32(&value) && value == 0x1);
CHECK(decoder.readVarU32(&value) && value == 0x42);
CHECK(decoder.readVarU32(&value) && value == 0x80);
CHECK(decoder.readVarU32(&value) && value == 0x180);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.