diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-15 19:39:51 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-21 09:56:06 -0500 |
| commit | 58df2b08f57076800745009aa4d562ef77ba6f9c (patch) | |
| tree | 9bb5b52a3daac689d965634002c08a2fe68e6c03 /factors/factors_test.go | |
| parent | 564e53cdd4d6fc8b611d59c2c19af42864e6ece4 (diff) | |
Add 2345 Score to output
Diffstat (limited to 'factors/factors_test.go')
| -rw-r--r-- | factors/factors_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/factors/factors_test.go b/factors/factors_test.go index ceaf4d1..f14dd31 100644 --- a/factors/factors_test.go +++ b/factors/factors_test.go @@ -105,6 +105,23 @@ func TestFactorScore(t *testing.T) { } } +var basicRankCases = map[uint]string{ + 2: "D-", 3: "E-", 4: "C~", 5: "F+", 6: "B~", + 7: "F-", 8: "C-", 9: "E~", 10: "D+", 11: "F~", 12: "A-", + 14: "D~", 15: "E+", 18: "B-", 20: "C+", 24: "A~", 30: "B+", 60: "A+", +} + +func TestBasicRank (t *testing.T) { + for i, expected := range basicRankCases { + t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { + actual := BasicRank(i) + if expected != actual { + t.Errorf("BasicRank(%d) = %s, want %s", i, actual, expected) + } + }) + } +} + func mapEquals[K comparable, V comparable](a, b map[K]V) bool { for k := range a { if a[k] != b[k] { |
