Template:Inflation/testcases#Significant digits

{{Testcases}}

Examples for all supported currency types

=100 in 2000, adjusted to latest supported year=

{{testcase table|_showcode=yes|AU|100|2000}}

{{testcase table|_showcode=yes|AU-road|100|2000}}

{{testcase table|_showcode=yes|BD|100|2000}}

{{testcase table|_showcode=yes|CA|100|2000}}

{{testcase table|_showcode=yes|DE|100|2000}}

{{testcase table|_showcode=yes|IR|100|1379}}

{{testcase table|_showcode=yes|JP|100|2000}}

{{testcase table|_showcode=yes|KRW|100|2000}}

{{testcase table|_showcode=yes|PH|100|2000}}

{{testcase table|_showcode=yes|PK|100|2000}}

{{testcase table|_showcode=yes|UK|100|2000}}

{{testcase table|_showcode=yes|UK-GDP|100|2000}}

{{testcase table|_showcode=yes|US|100|2000}}

{{testcase table|_showcode=yes|US-GDP|100|2000}}

{{testcase table|_showcode=yes|ZAR|100|2000}}

=100 in 2000, adjusted to 2014=

{{testcase table|_showcode=yes|AU|100|2000|2014}}

{{testcase table|_showcode=yes|AU-road|100|2000|2014}}

{{testcase table|_showcode=yes|BD|100|2000|2014}}

{{testcase table|_showcode=yes|CA|100|2000|2014}}

{{testcase table|_showcode=yes|DE|100|2000|2014}}

{{testcase table|_showcode=yes|IR|100|1379|1393}}

{{testcase table|_showcode=yes|JP|100|2000|2014}}

{{testcase table|_showcode=yes|KRW|100|2000|2014}}

{{testcase table|_showcode=yes|PH|100|2000|2014}}

{{testcase table|_showcode=yes|PK|100|2000|2014}}

{{testcase table|_showcode=yes|UK|100|2000|2014}}

{{testcase table|_showcode=yes|UK-GDP|100|2000|2014}}

{{testcase table|_showcode=yes|US|100|2000|2014}}

{{testcase table|_showcode=yes|US-GDP|100|2000|2014}}

{{testcase table|_showcode=yes|ZAR|100|2000|2014}}

Changes to data set

; dependencies

  • {{tl|Inflation/TEST}}
  • {{tl|Inflation/TEST/dataset}}
  • {{tl|Inflation/TEST/startyear}}

;Test cases for

class="wikitable"
UKTEST
A widget in 1900 was worth £90 (Approximately £{{inflation|UK|90|1900}} today)A widget in 1900 was worth £90 (Approximately £{{inflation|TEST|90|1900}} today)
A widget in 1900 was worth £90 (Approximately £{{inflation|UK|90|1900|1980}} in 1980)A widget in 1900 was worth £90 (Approximately £{{inflation|TEST|90|1900|1980}} in 1980)
A pre-decimal penny was worth in 1854 about the same as {{#expr:{{Inflation|UK|0.0041666|1854|r=2}}*100}}p today.A pre-decimal penny was worth in 1854 about the same as {{#expr:{{Inflation|TEST|0.0041666|1854|r=2}}*100}}p today.{{Inflation/fn|UK}}
This should be {{#expr:108.56/105.27}}£1 in 2011 is worth approximately £{{inflation|TEST|1|2011|r=2}} today.

Errors

{{test case|_collapsible=yes|_showcode=yes|_title=Missing parameters fail}}

{{test case|_collapsible=yes|_showcode=yes|_title=Index fail|INVALID|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}}

{{test case|US|0.96|2017|2018|r=1|_format=columns|_showcode=yes}}

{{test case|US|0.96|2017|2018|r=2|_format=columns|_showcode=yes}}

{{test case|US|0.96|2017|2018|r=3|_format=columns|_showcode=yes}}

Equivalence

{{test case|US|96|2017|2018|r=0|fmt=eq|_format=columns|_showcode=yes}}

{{test case|US|96|2017|2018|r=0|fmt=eqm|_format=columns|_showcode=yes}}

{{test case|US|96|2017|2018|r=0|fmt=eq|_format=columns|_showcode=yes|orig=yes|cursign=£}}

Wrapping with Template:format price

  • {{Aye}} {{mxt|${{Format price|{{tlf|Inflation|US-GDP|10000000000000|1900}}}}}} → {{xt|${{Format price|{{Inflation|US-GDP|10000000000000|1900}}}}}}
  • {{Aye}} {{mxt|${{Format price|{{tlf|Inflation|US-GDP|1000000|1990}}}}}} → {{xt|${{Format price|{{Inflation|US-GDP|1000000|1990}}}}}}
  • {{Aye}} {{mxt|DM {{Format price|{{tlf|Inflation|DE|1000000|1957|1978}}}}}} → {{xt|DM {{Format price|{{Inflation|DE|1000000|1957|1978}}}}}}
  • {{Aye}} {{mxt|£{{Format price|{{tlf|Inflation|UK-GDP|1000|1323}}}}}} → {{xt|£{{Format price|{{Inflation|UK|1000|1323}}}}}}

sandbox:

  • {{Aye}} {{mxt|${{Format price|{{tlf|Inflation/sandbox|US-GDP|10000000000000|1900}}}}}} → {{xt|${{Format price|{{Inflation/sandbox|US-GDP|10000000000000|1900}}}}}}
  • {{Aye}} {{mxt|${{Format price|{{tlf|Inflation/sandbox|US-GDP|1000000|1990}}}}}} → {{xt|${{Format price|{{Inflation/sandbox|US-GDP|1000000|1990}}}}}}
  • {{Aye}} {{mxt|DM {{Format price|{{tlf|Inflation/sandbox|DE|1000000|1957|1978}}}}}} → {{xt|DM {{Format price|{{Inflation/sandbox|DE|1000000|1957|1978}}}}}}
  • {{Aye}} {{mxt|£{{Format price|{{tlf|Inflation/sandbox|UK-GDP|1000|1323}}}}}} → {{xt|£{{Format price|{{Inflation/sandbox|UK|1000|1323}}}}}}

Other test cases

{{test case|_collapsible=yes|_showcode=yes|_title=Very large amount of money|US|25000000000|2010}}

References