pop-count

This commit is contained in:
2023-12-20 23:21:06 -05:00
parent ec644472b3
commit 833fe9c0f5
10 changed files with 304 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
defmodule PopCountTest do
use ExUnit.Case
describe "egg count" do
test "0 eggs" do
assert PopCount.egg_count(0) == 0
end
# @tag :pending
test "1 egg" do
assert PopCount.egg_count(16) == 1
end
# @tag :pending
test "4 eggs" do
assert PopCount.egg_count(89) == 4
end
# @tag :pending
test "13 eggs" do
assert PopCount.egg_count(2_000_000_000) == 13
end
# @tag :pending
test "100 eggs" do
assert PopCount.egg_count(1_267_650_600_228_229_401_496_703_205_375) == 100
end
end
end

View File

@@ -0,0 +1,2 @@
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)