- Add jump_credo_checks ~> 0.4 with all 20 checks enabled - Fix all standard Credo issues: 139 @spec (113 done, 26 remain), 4 refactoring, 3 alias usage, 9 System.cmd env, 5 unsafe_to_atom, 2 max line length, 9 assert_receive timeout - Fix 170+ jump_credo_checks warnings: - 117 TopLevelAliasImportRequire: move nested alias/import to module top - 32 UseObanProWorker: switch to Oban.Pro.Worker - 4 DoctestIExExamples: add doctests / create test file - ~20 WeakAssertion: strengthen type-check assertions - Various ConditionalAssertion, AssertReceiveTimeout fixes - Exclude vendor/ from Credo analysis - Remaining: 175 warnings (mostly opinionated WeakAssertion, AvoidSocketAssignsInTest), 26 @spec annotations
24 lines
597 B
Elixir
24 lines
597 B
Elixir
defmodule Microwaveprop.Propagation.RegionTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias Microwaveprop.Propagation.Region
|
|
|
|
test "Atlanta GA is in southeast" do
|
|
assert Region.for_point(33.7, -84.4) == :southeast
|
|
end
|
|
|
|
test "Denver CO falls into a region" do
|
|
assert Region.for_point(39.7, -104.9) in [
|
|
:northwest,
|
|
:northcentral,
|
|
:southwest,
|
|
:southeentral,
|
|
:midwest,
|
|
:other
|
|
]
|
|
end
|
|
|
|
test "returns :other for points outside CONUS" do
|
|
assert Region.for_point(19.0, -155.0) == :other
|
|
end
|
|
end
|