Difference between revisions of "Template:Inflation/testcases"
Jump to navigation
Jump to search
imported>Pppery (→Errors: Add a test case (copied from Macy's Inc. for billions of dollars; this broke at one point; reformat rest of test cases for easier comparison) |
imported>Jonesey95 (add sig fig test) |
||
| Line 23: | Line 23: | ||
{{test case|_collapsible=yes|_showcode=yes|_title=Index fail|a|b|c}} | {{test case|_collapsible=yes|_showcode=yes|_title=Index fail|a|b|c}} | ||
{{test case|_collapsible=yes|_showcode=yes|_title=Non-numeric fail|DE|b|c}} | {{test case|_collapsible=yes|_showcode=yes|_title=Non-numeric fail|DE|b|c}} | ||
| + | ==Significant digits== | ||
| + | {{test case|US|1|2017|2018|r=1|_format=columns|_showcode=yes}} | ||
| + | {{test case|US|1|2017|2018|r=2|_format=columns|_showcode=yes}} | ||
| + | {{test case|US|1|2017|2018|r=3|_format=columns|_showcode=yes}} | ||
==Other test cases== | ==Other test cases== | ||
{{test case|_collapsible=yes|_showcode=yes|_title=Very large amount of money|US|25000000000|2010}} | {{test case|_collapsible=yes|_showcode=yes|_title=Very large amount of money|US|25000000000|2010}} | ||
Revision as of 23:01, 21 October 2019
Changes to data set
- dependencies
- Test cases for
| UK | TEST |
|---|---|
| A widget in 1900 was worth £90 (Approximately £9810 today) | A widget in 1900 was worth £90 (Approximately £8245 today) |
| A widget in 1900 was worth £90 (Approximately £2271 in 1980) | A widget in 1900 was worth £90 (Approximately £2271 in 1980) |
| A pre-decimal penny was worth in 1854 about the same as 39p today. | A pre-decimal penny was worth in 1854 about the same as 33p today.[1] |
| This should be 1.031252968557 | £1 in 2011 is worth approximately £1.03 today. |
Errors
| Missing parameters fail |
|---|
{{Inflation}}
{{Inflation}} Error when using {{Inflation}}: Error when using {{Inflation}}: |
| Index fail |
|---|
{{Inflation|a|b|c}}
{{Inflation}} Error when using {{Inflation}}: Error when using {{Inflation}}: |
| Non-numeric fail |
|---|
{{Inflation|DE|b|c}}
{{Inflation}} Error when using {{Inflation}}: NaN, check parameters for non-numeric data: Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |
Significant digits
{{Inflation|US|1|2017|2018|r=1}}
| {{Inflation}} | {{Inflation/sandbox}} |
|---|---|
| 1 | Template:Round |
{{Inflation|US|1|2017|2018|r=2}}
| {{Inflation}} | {{Inflation/sandbox}} |
|---|---|
| 1.02 | Template:Round |
{{Inflation|US|1|2017|2018|r=3}}
| {{Inflation}} | {{Inflation/sandbox}} |
|---|---|
| 1.024 | Template:Round |
Other test cases
| Very large amount of money |
|---|
{{Inflation|US|25000000000|2010}}
{{Inflation}} 29311002594 |
References
- ↑ UK Retail Price Index inflation figures are based on data from Clark, Gregory (2017). "The Annual RPI and Average Earnings for Britain, 1209 to Present (New Series)". MeasuringWorth. Retrieved February 2, 2020.