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

Version Path
trackler-2.2.1.180 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.179 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.178 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.177 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.176 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.175 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.174 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.173 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.172 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.171 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.170 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.169 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.167 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.166 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.165 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.164 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.163 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.162 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.161 tracks/coffeescript/exercises/binary/binary_test.spec.coffee
trackler-2.2.1.160 tracks/coffeescript/exercises/binary/binary_test.spec.coffee