Sha256: 0281ca1a492cacdbdd7b2d363022f82076269be63b81ec1dd1e0a556a7469c23

Contents?: true

Size: 751 Bytes

Versions: 396

Compression:

Stored size: 751 Bytes

Contents

local grains = require('grains')

describe('grains', function()
  it('square 1', function()
    assert.are.equals(1, grains.square(1))
  end)

  it('square 2', function()
    assert.are.equals(2, grains.square(2))
  end)

  it('square 3', function()
    assert.are.equals(4, grains.square(3))
  end)

  it('square 4', function()
    assert.are.equals(8, grains.square(4))
  end)

  it('square 16', function()
    assert.are.equals(32768, grains.square(16))
  end)

  it('square 32', function()
    assert.are.equals(2147483648, grains.square(32))
  end)

  it('square 64', function()
    assert.are.equals(9223372036854775808, grains.square(64))
  end)

  it('total', function()
    assert.are.equals(18446744073709551615, grains.total())
  end)
end)

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.118 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.117 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.116 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.115 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.114 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.113 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.111 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.110 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.109 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.108 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.107 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.106 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.105 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.104 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.103 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.102 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.101 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.100 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.99 tracks/lua/exercises/grains/grains_spec.lua