Jump to content

Template:Winning percentage/testcases

From Wikipedia, the free encyclopedia

Testing sandbox version

[edit]
Example Expected output Actual output
{{winning percentage/sandbox | | | |record=y}} 0–0 (–) – (–)
{{winning percentage/sandbox | 0 | 0 | 0}}
{{winning percentage/sandbox | 0 | 0 | 1|record=y}} 0–0–1 (.500) 0–0–1 (.500)
{{winning percentage/sandbox | 0 | 1 | 0}} .000 .000
{{winning percentage/sandbox | 0 | 1 | 1}} .250 .250
{{winning percentage/sandbox | 1 | 0 | 0}} 1.000 1.000
{{winning percentage/sandbox | 1 | 0 | 1}} .750 .750
{{winning percentage/sandbox | 1 | 1 | 0}} .500 .500
{{winning percentage/sandbox | 1 | 1 | 1}} .500 .500
{{winning percentage/sandbox | 1 | 1||record=y}} 1–1 (.500) 1–1 (.500)
{{winning percentage/sandbox | 1,000 | 1,000|1,000|record=y}} 1,000–1,000–1,000 (.500) 1,000–1,000–1,000 (.500)
{{winning percentage/sandbox| 30 | 20 | 10}} .583 .583
{{winning percentage/sandbox| 30 | 20 | 10 | ignore_ties=y}} .500 .500
{{winning percentage/sandbox| 30 | 20 | 10 | ignore_ties=n}} .583 .583
{{winning percentage/sandbox| 30 | 20 | ignore_ties=y}} .600 .600

Testing main template

[edit]
Example Expected output Actual output
{{winning percentage | | | }}
{{winning percentage | 0 | 0 | 0}}
{{winning percentage | 0 | 0 | 1}} .500 .500
{{winning percentage | 0 | 1 | 0}} .000 .000
{{winning percentage | 0 | 1 | 1}} .250 .250
{{winning percentage | 1 | 0 | 0}} 1.000 1.000
{{winning percentage | 1 | 0 | 1}} .750 .750
{{winning percentage | 1 | 1 | 0}} .500 .500
{{winning percentage | 1 | 1 | 1}} .500 .500
{{winning percentage | 1,000 | 1,000 | 1,000}} .500 .500