From 0506283ae43f826e126e0949c662bccaa44f79dd Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 26 Sep 2021 02:27:50 +1000 Subject: [PATCH] Add test case (Dail-like rules) from Grey-Fitzgerald ERS booklet --- tests/data/grey_fitzgerald.blt | 46 +++++++++++++++++++++++++++++++++ tests/data/grey_fitzgerald.csv | 14 ++++++++++ tests/data/grey_fitzgerald.ods | Bin 0 -> 12259 bytes tests/tests_impl/dail.rs | 20 ++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 tests/data/grey_fitzgerald.blt create mode 100644 tests/data/grey_fitzgerald.csv create mode 100644 tests/data/grey_fitzgerald.ods diff --git a/tests/data/grey_fitzgerald.blt b/tests/data/grey_fitzgerald.blt new file mode 100644 index 0000000..a642558 --- /dev/null +++ b/tests/data/grey_fitzgerald.blt @@ -0,0 +1,46 @@ +# Comment: Ballot papers derived from the Grey-Fitzgerald (1955) model election - all votes - Dail-like rules +# Source: RunasSudo +# Contributor: RunasSudo +11 6 +5 1 7 3 +27 2 4 +2 2 4 1 +2 2 4 5 +43 2 4 9 +5 2 4 10 +1 2 4 0 +2 2 5 +25 2 9 +10 2 10 +4 2 10 3 +4 2 10 9 3 +3 2 10 9 11 +8 2 10 9 0 +4 2 0 +25 3 +10 4 +1 5 7 3 +3 5 9 +1 5 10 11 +50 6 0 # ?? +9 6 11 +2 6 3 +1 6 1 7 3 +12 7 11 +2 7 +50 8 +13 9 +24 11 +0 +"A" # 1 +"B" # 2 +"C" # 3 +"D" # 4 +"E" # 5 +"F" # 6 +"G" # 7 +"H" # 8 +"J" # 9 +"K" # 10 +"L" # 11 +"Grey–Fitzgerald Example" diff --git a/tests/data/grey_fitzgerald.csv b/tests/data/grey_fitzgerald.csv new file mode 100644 index 0000000..eee7da0 --- /dev/null +++ b/tests/data/grey_fitzgerald.csv @@ -0,0 +1,14 @@ +Stage:,1,,2,,3,,4,,5,,6,,7,,8, +Comment:,First preferences,,Surplus of B,,Surplus of D,,Surplus of F,,"Exclusion of A, E",,Exclusion of K,,Exclusion of G,,Surplus of J, +A,5,H,5,H,5,H,6,H,0,EX,0,EX,0,EX,0,EX +B,140,EL,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL +C,25,H,25,H,25,H,27,H,27,H,31,H,38,H,42,H +D,10,H,63,EL,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL +E,5,H,6,H,7,H,7,H,0,EX,0,EX,0,EX,0,EX +F,62,EL,62,EL,62,EL,50,EL,50,EL,50,EL,50,EL,50,EL +G,14,H,14,H,14,H,14,H,21,H,21,H,0,EX,0,EX +H,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL,50,EL +J,13,H,30,H,41,H,41,H,44,H,59,EL,59,EL,50,EL +K,0,H,19,H,20,H,20,H,21,H,0,EX,0,EX,0,EX +L,24,H,24,H,24,H,33,H,33,H,34,H,46,H,49,EL +Non-transferable,0,,0,,0,,0,,2,,3,,5,,7, diff --git a/tests/data/grey_fitzgerald.ods b/tests/data/grey_fitzgerald.ods new file mode 100644 index 0000000000000000000000000000000000000000..afc3c3b6b15b83fdb0a7a68164ee28e2af240e8e GIT binary patch literal 12259 zcmc(FWmp|c*6t3j!QI_AZo%E%-DTslfuKQx6Wk>b+}+(>f`#B7T!RGyTrzXdVA5?wW?Ots@f~Z!V(w~fVF6bDH_R89 ze+lkONzBo~5@hA(@((muHfFG+qn)XV3-kX>%hJx#1Z?p?)q1hi?Z4NB{}&cIIXbyH z{ZjoeHWL1Yo{5>6g`LGqLmmH{oqtv1uRd`yaj>xaAJ*vP;%Mb!;p+N7Z=);N1nl;I z(IfebHiGO;tSnraML}SD6DQaIZ7v)f+&_lX%lrQlq?eMti37;e!W9g3F}IvZm~aSU zL4AM5A8axCRhStX+J$zs#U{I(GejGj`7#}Stus17QzgIjFneyhQj&c=x<2E?gm5^r zwzx-~!;Fq!ab|i9d*fu6KO!c_+8vEwxm@M>(;cx1<7*t8YqjY7tBtRXai( zN#g>9Kfue6z6S>p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f@=ppyookEdF!Et@ES+M{{f)!omvQu*w@M>0)_VlcY> zgW9;()lC^}o!WflW(#3mX7dKtIu)U3(H#?AYR>2QRkl%95vs@m7(hy$T(=DV;{i5J}`M0WqV9IsHN-N$}Y>)g7aE3h4i3c2bB z*npJ2>*Po8gV^aiWt|i#1u^34HVjkm`2gG-xlzfV4;RZuzmhCr;g8R(FFY?ss9#Bz zR}h$hzh~P1^3QMigLnI%TEE};XL9EEz4}Y>@0qp#UiWXU|3r!S3zXkX+y7UT?!Q3! z&Ak14lwVBP-*WR({LdEsnTh-NIKQ~KzXkZ>f&aw$cV_P2BmKKY)_;NYXQuAowN{-@TT879Ayj=#nKC6D==DEXgyf8Ndd z#XtEiYA3W6kjE?tcM`{8gp^ literal 0 HcmV?d00001 diff --git a/tests/tests_impl/dail.rs b/tests/tests_impl/dail.rs index 4aad626..901d3e2 100644 --- a/tests/tests_impl/dail.rs +++ b/tests/tests_impl/dail.rs @@ -19,6 +19,7 @@ use crate::utils; use opentally::numbers::Rational; use opentally::stv; +use opentally::ties::TieStrategy; #[test] fn dublin_north_2002_rational() { @@ -36,3 +37,22 @@ fn dublin_north_2002_rational() { utils::read_validate_election::("tests/data/DublinNorthSorted.csv", "tests/data/DublinNorthSorted.blt", stv_opts, None, &["exhausted"]); } + +#[test] +fn grey_fitzgerald_rational() { + let stv_opts = stv::STVOptionsBuilder::default() + .round_quota(Some(0)) + .normalise_ballots(true) + .quota_criterion(stv::QuotaCriterion::GreaterOrEqual) + .ties(vec![TieStrategy::Forwards]) + .surplus(stv::SurplusMethod::Hare) + .surplus_order(stv::SurplusOrder::BySize) // Differs to Dail + .transferable_only(true) + .bulk_exclude(true) + .defer_surpluses(true) + .build().unwrap(); + + assert_eq!(stv_opts.describe::(), "--round-quota 0 --normalise-ballots --quota-criterion geq --ties forwards --surplus hare --transferable-only --bulk-exclude --defer-surpluses"); + + utils::read_validate_election::("tests/data/grey_fitzgerald.csv", "tests/data/grey_fitzgerald.blt", stv_opts, None, &["exhausted"]); +}