Sha256: 5861c6d68cced7cd818cd38418724a237c541c56c16d651a110547b7ed8ba4a9

Contents?: true

Size: 994 Bytes

Versions: 45

Compression:

Stored size: 994 Bytes

Contents

#!/usr/bin/env ruby
require 'minitest/autorun'
require_relative 'prime_factors'

class PrimeFactorsTest < Minitest::Test
  def test_1
    assert_equal [], PrimeFactors.for(1)
  end

  def test_2
    skip
    assert_equal [2], PrimeFactors.for(2)
  end

  def test_3
    skip
    assert_equal [3], PrimeFactors.for(3)
  end

  def test_4
    skip
    assert_equal [2, 2], PrimeFactors.for(4)
  end

  def test_6
    skip
    assert_equal [2, 3], PrimeFactors.for(6)
  end

  def test_8
    skip
    assert_equal [2, 2, 2], PrimeFactors.for(8)
  end

  def test_9
    skip
    assert_equal [3, 3], PrimeFactors.for(9)
  end

  def test_27
    skip
    assert_equal [3, 3, 3], PrimeFactors.for(27)
  end

  def test_625
    skip
    assert_equal [5, 5, 5, 5], PrimeFactors.for(625)
  end

  def test_901255
    skip
    assert_equal [5, 17, 23, 461], PrimeFactors.for(901_255)
  end

  def test_93819012551
    skip
    assert_equal [11, 9539, 894_119], PrimeFactors.for(93_819_012_551)
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.52 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.51 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.50 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.49 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.48 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.47 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.46 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.45 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.44 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.43 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.42 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.41 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.40 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.39 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.38 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.37 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.36 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.34 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.33 tracks/ruby/exercises/prime-factors/prime_factors_test.rb