resistor_color

This commit is contained in:
2024-03-11 11:20:18 -04:00
parent af9641f4e9
commit 4265743d75
10 changed files with 289 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
defmodule ResistorColorTest do
use ExUnit.Case
# @tag :pending
test "returns black color code" do
assert ResistorColor.code(:black) == 0
end
# @tag :pending
test "returns brown color code" do
assert ResistorColor.code(:brown) == 1
end
# @tag :pending
test "returns red color code" do
assert ResistorColor.code(:red) == 2
end
# @tag :pending
test "returns orange color code" do
assert ResistorColor.code(:orange) == 3
end
# @tag :pending
test "returns yellow color code" do
assert ResistorColor.code(:yellow) == 4
end
# @tag :pending
test "returns green color code" do
assert ResistorColor.code(:green) == 5
end
# @tag :pending
test "returns blue color code" do
assert ResistorColor.code(:blue) == 6
end
# @tag :pending
test "returns violet color code" do
assert ResistorColor.code(:violet) == 7
end
# @tag :pending
test "returns grey color code" do
assert ResistorColor.code(:grey) == 8
end
# @tag :pending
test "returns white color code" do
assert ResistorColor.code(:white) == 9
end
end

View File

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