Difference between revisions of "Template:Inflation/testcases"
Jump to navigation
Jump to search
imported>MSGJ m |
imported>Mr. Guye |
||
| Line 19: | Line 19: | ||
| This should be {{#expr:108.56/105.27}} || £1 in 2011 is worth approximately £{{inflation|TEST|1|2011|r=2}} today. | | This should be {{#expr:108.56/105.27}} || £1 in 2011 is worth approximately £{{inflation|TEST|1|2011|r=2}} today. | ||
|} | |} | ||
| + | ==Errors== | ||
| + | ===Missing parameters fail=== | ||
| + | *<code><nowiki>{{Inflation}}</nowiki></code> | ||
| + | {{Inflation}} | ||
| + | ===Index fail=== | ||
| + | *<code><nowiki>{{Inflation|a|b|c}}</nowiki></code> | ||
| + | |||
| + | {{Inflation|a|b|c}} | ||
| + | |||
| + | ===Non-numeric fail=== | ||
| + | *<code><nowiki>{{Inflation|DE|b|c}}</nowiki></code> | ||
| + | |||
| + | {{Inflation|DE|b|c}} | ||
==References== | ==References== | ||
<references/> | <references/> | ||
Revision as of 21:41, 11 July 2018
Contents
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}}
Error when using {{Inflation}}: |index= (parameter 1), |value= (parameter 2) and |start_year= (parameter 3) must be specified.
Index fail
{{Inflation|a|b|c}}
Error when using {{Inflation}}: |index=a (parameter 1) not a recognized index.
Non-numeric fail
{{Inflation|DE|b|c}}
Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |value=b (parameter 2) and |start_year=c (parameter 3).
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.