Sha256: 5798ea577d044a0442214fe4a774bf8058b236e642f63efa74ceacdb6eb0a62f
Contents?: true
Size: 1.51 KB
Versions: 69
Compression:
Stored size: 1.51 KB
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("prime_factors.exs", __DIR__) end ExUnit.start() ExUnit.configure(exclude: :pending, trace: true) defmodule PrimeFactorsTest do use ExUnit.Case # @tag :pending test "1" do assert PrimeFactors.factors_for(1) == [] end @tag :pending test "2" do assert PrimeFactors.factors_for(2) == [2] end @tag :pending test "3" do assert PrimeFactors.factors_for(3) == [3] end @tag :pending test "4" do assert PrimeFactors.factors_for(4) == [2, 2] end @tag :pending test "6" do assert PrimeFactors.factors_for(6) == [2, 3] end @tag :pending test "8" do assert PrimeFactors.factors_for(8) == [2, 2, 2] end @tag :pending test "9" do assert PrimeFactors.factors_for(9) == [3, 3] end @tag :pending test "27" do assert PrimeFactors.factors_for(27) == [3, 3, 3] end @tag :pending test "625" do assert PrimeFactors.factors_for(625) == [5, 5, 5, 5] end @tag :pending test "901255" do assert PrimeFactors.factors_for(901_255) == [5, 17, 23, 461] end @tag :pending test "93819012551" do assert PrimeFactors.factors_for(93_819_012_551) == [11, 9539, 894_119] end @tag :pending # @tag timeout: 2000 # # The timeout tag above will set the below test to fail unless it completes # in under two sconds. Uncomment it if you want to test the efficiency of your # solution. test "10000000055" do assert PrimeFactors.factors_for(10_000_000_055) == [5, 2_000_000_011] end end
Version data entries
69 entries across 69 versions & 1 rubygems