Sha256: d2bed25150d19d37fcf862993291427ccc3860889a261a9f15940dcf221c96f8

Contents?: true

Size: 785 Bytes

Versions: 54

Compression:

Stored size: 785 Bytes

Contents

#!/usr/bin/env ruby
gem 'minitest', '>= 5.0.0'
require 'minitest/autorun'
require_relative 'grains'

class GrainsTest < Minitest::Test
  def test_square_1
    assert_equal 1, Grains.square(1)
  end

  def test_square_2
    skip
    assert_equal 2, Grains.square(2)
  end

  def test_square_3
    skip
    assert_equal 4, Grains.square(3)
  end

  def test_square_4
    skip
    assert_equal 8, Grains.square(4)
  end

  def test_square_16
    skip
    assert_equal 32_768, Grains.square(16)
  end

  def test_square_32
    skip
    assert_equal 2_147_483_648, Grains.square(32)
  end

  def test_square_64
    skip
    assert_equal 9_223_372_036_854_775_808, Grains.square(64)
  end

  def test_total_grains
    skip
    assert_equal 18_446_744_073_709_551_615, Grains.total
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trackler-2.0.5.17 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.16 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.15 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.14 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.13 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.12 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.11 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.10 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.9 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.8 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.7 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.6 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.5 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.4 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.3 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.2 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.1 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.5.0 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.4.0 tracks/ruby/exercises/grains/grains_test.rb
trackler-2.0.3.9 tracks/ruby/exercises/grains/grains_test.rb