ABIF: Difference between revisions

2,358 bytes added ,  3 years ago
Added several more test cases
(Starting a test case section, and crediting jman722 for inspiration to revive my 1996 perl script (see User:RobLa/TPJ))
(Added several more test cases)
Line 4:
 
=== Test case 1 ===
 
Unordered scores
 
12: Allie/5, Billy/5, Candace/4, Dennis/3, Edith/3, Frank/2, Georgie/1, Harold/0
Line 12 ⟶ 14:
name="reddit-post-jman722-2020-05-25"
>https://www.reddit.com/r/EndFPTP/comments/nkm2cd/standardizing_cardinal_ballot_notation/</ref>)
 
=== Test case 2 ===
 
Ranked counterpart to [[#Test case 1]].
 
12: Allie=Billy>Candace>Dennis=Edith>Frank>Georgie>Harold
7: Georgie>Allie>Dennis=Harold>Candace>Edith>Billy=Frank
5: Frank>Edith=Harold>Billy=Dennis=Georgie>Candace>Allie
 
=== Test case 3 ===
 
Merged format to express both the range and the ordering:
 
12: Allie/5 =Billy/5 >Candace/4 >Dennis/3 =Edith/3 >Frank/2 >Georgie/1 >Harold/0
7: Georgie/5 >Allie/4 >Dennis/3 =Harold/3 >Candace/2 >Edith/1 >Billy/0 =Frank/0
5: Frank/5 >Edith/4 =Harold/4 >Billy/3 =Dennis/3 =Georgie/3 >Candace/2 >Allie/0
 
=== Test case 4 ===
 
Bracketed candidate tokens (inlined). Unordered scores.
 
27: [Doña García Márquez]/5, [Steven B. Jensen]/2, [Sue Ye (蘇業)]/1, [Adam Muñoz]/0
26: [Doña García Márquez]/3, [Steven B. Jensen]/5, [Sue Ye (蘇業)]/3, [Adam Muñoz]/1
24: [Doña García Márquez]/2, [Steven B. Jensen]/1, [Sue Ye (蘇業)]/5, [Adam Muñoz]/2
23: [Doña García Márquez]/1, [Steven B. Jensen]/0, [Sue Ye (蘇業)]/3, [Adam Muñoz]/5
 
=== Test case 5 ===
 
Bracketed candidate tokens (declared). Unordered scores.
 
[Doña García Márquez]: DGM
[Steven B. Jensen]: SBJ
[Sue Ye (蘇業)]: SY
[Adam Muñoz]: AM
 
27: DGM/5, SBJ/2, SY/1, AM/0
26: DGM/3, SBJ/5, SY/3, AM/1
24: DGM/2, SBJ/1, SY/5, AM/2
23: DGM/1, SBJ/0, SY/3, AM/5
 
=== Test case 6 ===
 
Bracketed candidate tokens (declared). Ranked and scored.
 
[Doña García Márquez]: DGM
[Steven B. Jensen]: SBJ
[Sue Ye (蘇業)]: SY
[Adam Muñoz]: AM
 
27: DGM/5 > SBJ/2 > SY/1 > AM/0
26: SBJ/5 > DGM/3 = SY/3 > AM/1
24: SY/5 > DGM/2 = AM/2 > SBJ/1
23: AM/5 > SY/3 > DGM/1 > SBJ/0
 
 
=== Test case 7 ===
 
Bracketed candidate tokens (declared). Ranked with no score.
 
[Doña García Márquez]: DGM
[Steven B. Jensen]: SBJ
[Sue Ye (蘇業)]: SY
[Adam Muñoz]: AM
 
27: DGM > SBJ > SY > AM
26: SBJ > DGM = SY > AM
24: SY > DGM = AM > SBJ
23: AM > SY > DGM > SBJ
 
=== Test case 8 ===
 
Bracketed candidate tokens (mixed). Ranked with no score. Most extra whitespace removed.
 
[Doña García Márquez]:DGM
[Steven B. Jensen]:SBJ
[Adam Muñoz]:AM
 
27:DGM>SBJ>[蘇業]>AM
26:SBJ>DGM=[蘇業]>AM
24:[蘇業]>DGM=AM>SBJ
23:AM>[蘇業]>DGM>SBJ
 
== Footnotes ==