my-solutions/leetcode/0011-container-with-most-water/elixir/test/solution_test.exs

19 lines
389 B
Elixir
Raw Normal View History

defmodule SolutionTest do
use ExUnit.Case
doctest Solution
test "example 1" do
assert Solution.max_area([1, 8, 6, 2, 5, 4, 8, 3, 7]) == 49
end
test "example 2" do
assert Solution.max_area([1, 1]) == 1
end
test "large input" do
length = Integer.pow(10, 7)
input = Enum.map(1..length, fn _ -> :rand.uniform(10000) end)
Solution.max_area(input)
end
end