UNPKG

@indrajala/asn1der

Version:

parse ASN.1 DER structures

28 lines 962 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const chai_1 = require("chai"); require("mocha"); const bitwise_1 = require("../bitwise"); describe('getStandAloneBitsValue', () => { it('getStandAloneBitsValue(255, [1]) == 1', () => { chai_1.expect(bitwise_1.getStandAloneBitsValue(255, [1])) .to .equal(1); }); it('getStandAloneBitsValue(128, [1]) == 0', () => { chai_1.expect(bitwise_1.getStandAloneBitsValue(128, [1])) .to .equal(0); }); it('getStandAloneBitsValue(128, [8]) == 1', () => { chai_1.expect(bitwise_1.getStandAloneBitsValue(128, [8])) .to .equal(1); }); it('getStandAloneBitsValue(128, [8,7,6,5]) == 32', () => { chai_1.expect(bitwise_1.getStandAloneBitsValue(128, [8, 7, 6, 5])) .to .equal(8); }); }); //# sourceMappingURL=getStandAloneBitsValue.spec.js.map