Add credo to the project and:
- Run mix credo --all to identify possible code optimizations - Resolve most of the errors generated by credo such as: - Numbers larger than 9999 should be written with underscores: 58_127 - Modules should have a @moduledoc tag - Comparison will always return true
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
defmodule ComprehensionsTests do
|
||||
use ExUnit.Case
|
||||
import TestHarness
|
||||
|
||||
test "Comprehensions" do
|
||||
answers = [
|
||||
[1, 4, 9, 16],
|
||||
[1, 4, 9, 16],
|
||||
["Hello World", "Apple Pie"],
|
||||
["little dogs", "little cats", "big dogs", "big cats"],
|
||||
[4, 5, 6],
|
||||
%{"Pecan" => "Pecan Pie", "Pumpkin" => "Pumpkin Pie"}
|
||||
]
|
||||
|
||||
test_all(Comprehensions, answers)
|
||||
end
|
||||
|
||||
end
|
||||
defmodule ComprehensionsTests do
|
||||
use ExUnit.Case
|
||||
import TestHarness
|
||||
|
||||
test "Comprehensions" do
|
||||
answers = [
|
||||
[1, 4, 9, 16],
|
||||
[1, 4, 9, 16],
|
||||
["Hello World", "Apple Pie"],
|
||||
["little dogs", "little cats", "big dogs", "big cats"],
|
||||
[4, 5, 6],
|
||||
%{"Pecan" => "Pecan Pie", "Pumpkin" => "Pumpkin Pie"}
|
||||
]
|
||||
|
||||
test_all(Comprehensions, answers)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user