X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/0ef8f53fb812bcc40337a92f9c4d11ab193f73a9..60344b51d7e6c505492183b79b96b76216c95072:/test/runoff_test.rb diff --git a/test/runoff_test.rb b/test/runoff_test.rb deleted file mode 100644 index d153dd6..0000000 --- a/test/runoff_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/ruby - -require 'test/unit' -require 'election_test_helper' - -class TestRunoffVote < Test::Unit::TestCase - include ElectionTestHelper - - def test_runoff - vote_array = Array.new - 142.times {vote_array << "ABCD".split("")} - 26.times {vote_array << "BCDA".split("")} - 15.times {vote_array << "CDBA".split("")} - 17.times {vote_array << "DCBA".split("")} - - test_winner( "A", InstantRunoffVote.new(vote_array).result ) - end - - def test_runoff2 - vote_array = Array.new - 42.times {vote_array << "ABCD".split("")} - 26.times {vote_array << "BCDA".split("")} - 15.times {vote_array << "CDBA".split("")} - 17.times {vote_array << "DCBA".split("")} - - test_winner( "D", InstantRunoffVote.new(vote_array).result ) - end - - def test_runoff3 - vote_array = Array.new - 42.times {vote_array << "ABCD".split("")} - 26.times {vote_array << "ACBD".split("")} - 15.times {vote_array << "BACD".split("")} - 32.times {vote_array << "BCAD".split("")} - 14.times {vote_array << "CABD".split("")} - 49.times {vote_array << "CBAD".split("")} - 17.times {vote_array << "ABDC".split("")} - 23.times {vote_array << "BADC".split("")} - 37.times {vote_array << "BCDA".split("")} - 11.times {vote_array << "CADB".split("")} - 16.times {vote_array << "CBDA".split("")} - 54.times {vote_array << "ADBC".split("")} - 36.times {vote_array << "BDCA".split("")} - 42.times {vote_array << "CDAB".split("")} - 13.times {vote_array << "CDBA".split("")} - 51.times {vote_array << "DABC".split("")} - 33.times {vote_array << "DBCA".split("")} - 39.times {vote_array << "DCAB".split("")} - 12.times {vote_array << "DCBA".split("")} - - test_winner( "C", InstantRunoffVote.new(vote_array).result ) - end -end -