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.180 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.179 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.178 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.177 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.176 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.175 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.174 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.173 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.172 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.171 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.170 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.169 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.167 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.166 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.165 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.164 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.163 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.162 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.161 tracks/lua/exercises/grains/grains_spec.lua
trackler-2.2.1.160 tracks/lua/exercises/grains/grains_spec.lua