Add test count_values_non_tally

This commit is contained in:
kojix2
2021-01-19 22:37:15 +09:00
parent fbfcf80d25
commit 10e096d7c9
2 changed files with 8 additions and 2 deletions

View File

@@ -8,4 +8,10 @@ class YouPlotCommandTest < Test::Unit::TestCase
assert_equal([%i[a b c], [3, 2, 1]], @m.count_values(%i[a a a b b c]))
assert_equal([%i[c b a], [3, 2, 1]], @m.count_values(%i[a b b c c c]))
end
test :count_values_non_tally do
@m = YouPlot::Backends::Processing
assert_equal([%i[a b c], [3, 2, 1]], @m.count_values(%i[a a a b b c], tally: false))
assert_equal([%i[c b a], [3, 2, 1]], @m.count_values(%i[a b b c c c], tally: false))
end
end