Sha256: ead2d1a9a48837194aa3542f6465f9b9cdd2231dba59e6fc5a88ced156813e91
Contents?: true
Size: 841 Bytes
Versions: 396
Compression:
Stored size: 841 Bytes
Contents
Binary = require './binary' describe 'binary', -> it '1 is decimal 1', -> expect(new Binary('1').toDecimal()).toEqual 1 xit '10 is decimal 2', -> expect(new Binary('10').toDecimal()).toEqual 2 xit '11 is decimal 3', -> expect(new Binary('11').toDecimal()).toEqual 3 xit '100 is decimal 4', -> expect(new Binary('100').toDecimal()).toEqual 4 xit '1001 is decimal 9', -> expect(new Binary('1001').toDecimal()).toEqual 9 xit '11010 is decimal 26', -> expect(new Binary('11010').toDecimal()).toEqual 26 xit '10001101000 is decimal 1128', -> expect(new Binary('10001101000').toDecimal()).toEqual 1128 xit 'carrot is decimal 0', -> expect(new Binary('carrot').toDecimal()).toEqual 0 xit 'numeric but non-binary string is decimal 0', -> expect(new Binary('42').toDecimal()).toEqual 0
Version data entries
396 entries across 396 versions & 1 rubygems