Initial upload

This commit is contained in:
2022-08-24 14:28:45 +02:00
parent c67653ddee
commit 57bc7b0289
370 changed files with 18479 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,48 @@
defmodule YearTest do
use ExUnit.Case
# @tag :pending
test "year not divisible by 4 is common year" do
refute Year.leap_year?(2015)
end
@tag :pending
test "year divisible by 2, not divisible by 4 is common year" do
refute Year.leap_year?(1970)
end
@tag :pending
test "year divisible by 4, not divisible by 100 is leap year" do
assert Year.leap_year?(1996)
end
@tag :pending
test "year divisible by 4 and 5 is still a leap year" do
assert Year.leap_year?(1960)
end
@tag :pending
test "year divisible by 100, not divisible by 400 is common year" do
refute Year.leap_year?(2100)
end
@tag :pending
test "year divisible by 100 but not by 3 is still not a leap year" do
refute Year.leap_year?(1900)
end
@tag :pending
test "year divisible by 400 is leap year" do
assert Year.leap_year?(2000)
end
@tag :pending
test "year divisible by 400 but not by 125 is still a leap year" do
assert Year.leap_year?(2400)
end
@tag :pending
test "year divisible by 200, not divisible by 400 in common year" do
refute Year.leap_year?(1800)
end
end