Difference between revisions of "Template:CODATA2010-helper/testcases"
imported>Electrical & computer engineer (Undid revision 435516063 by Electrical & computer engineer (talk)) |
imported>Electrical & computer engineer (→Testing main template: added testcases with headings explaining the purpose of each) |
||
| Line 9: | Line 9: | ||
== Testing main template == | == Testing main template == | ||
| + | ==== No parameters ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
| − | |||
{{ {{BASEPAGENAME}} }} | {{ {{BASEPAGENAME}} }} | ||
| − | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | 2.99792458| e=8| include-units=link| units=m/s}}</nowiki></code> | + | |
| − | {{ {{BASEPAGENAME}} | 2.99792458| e=8| include-units=link| units=m/s}} | + | ==== Just a number ==== |
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|2}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|2}} | ||
| + | |||
| + | |||
| + | ==== Addition of uncertainty parameter ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|3.97259968933|(36)}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|3.97259968933|(36)}} | ||
| + | |||
| + | |||
| + | ==== Addition of power-of-ten parameter ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|7.2973525698|(24)|e=-3}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|7.2973525698|(24)|e=-3}} | ||
| + | |||
| + | |||
| + | ==== Addition of <code>include-units</code> and <code>units</code> with removal of uncertainty parameter ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|2.99792458|e=8|include-units=link|units=m/s}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|2.99792458|e=8|include-units=link|units=m/s}} | ||
| + | |||
| + | |||
| + | ==== Re-addition of uncertainty parameter ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|192.0155714|(32)|e=-12|include-units=link|units=m}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|192.0155714|(32)|e=-12|include-units=link|units=m}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>include-units=no link</code> ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|6.64465675|(29)|e=-27|include-units=no link|units=kg}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|6.64465675|(29)|e=-27|include-units=no link|units=kg}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>include-units=no</code> with <code>units</code> given anyway ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|5.97191967|(26)|e=-10|include-units=no|units=J}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|5.97191967|(26)|e=-10|include-units=no|units=J}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>include-units=no</code> ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|3727.379240|(82)|include-units=no}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|3727.379240|(82)|include-units=no}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>include-units</code> omitted when <code>units</code> is set ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|4.001506179125|(62)|units=u}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|4.001506179125|(62)|units=u}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>debug</code> set to the empty string ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|4.001506179125|(62)|e=-3|units=kg/mol|debug=}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|4.001506179125|(62)|e=-3|units=kg/mol|debug=}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>debug=yes</code> when all other parameters are set ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1.00001495|(90)|e=-10|include-units=no|units=m|debug=yes}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|1.00001495|(90)|e=-10|include-units=no|units=m|debug=yes}} | ||
| + | |||
| + | |||
| + | ==== Parameter <code>debug=yes</code> when other parameters are unset ==== | ||
| + | <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|7294.2995361|(29)|debug=yes}}</nowiki></code> | ||
| + | |||
| + | {{ {{BASEPAGENAME}}|7294.2995361|(29)|debug=yes}} | ||
Revision as of 22:21, 21 June 2011
| 42px | This is the template test cases page for the sandbox of Template:CODATA2010-helper. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
- 1 Testing sandbox version
- 2 Testing main template
- 2.1 No parameters
- 2.2 Just a number
- 2.3 Addition of uncertainty parameter
- 2.4 Addition of power-of-ten parameter
- 2.5 Addition of include-units and units with removal of uncertainty parameter
- 2.6 Re-addition of uncertainty parameter
- 2.7 Parameter include-units=no link
- 2.8 Parameter include-units=no with units given anyway
- 2.9 Parameter include-units=no
- 2.10 Parameter include-units omitted when units is set
- 2.11 Parameter debug set to the empty string
- 2.12 Parameter debug=yes when all other parameters are set
- 2.13 Parameter debug=yes when other parameters are unset
Testing sandbox version
{{CODATA2010-helper/sandbox}}
Template:CODATA2010-helper/sandbox
Testing main template
No parameters
{{CODATA2010-helper}}
This call of CODATA2010-helper lacks unnamed parameters.
Just a number
{{CODATA2010-helper|2}}
Addition of uncertainty parameter
{{CODATA2010-helper|3.97259968933|(36)}}
Addition of power-of-ten parameter
{{CODATA2010-helper|7.2973525698|(24)|e=-3}}
Addition of include-units and units with removal of uncertainty parameter
{{CODATA2010-helper|2.99792458|e=8|include-units=link|units=m/s}}
Re-addition of uncertainty parameter
{{CODATA2010-helper|192.0155714|(32)|e=-12|include-units=link|units=m}}
Parameter include-units=no link
{{CODATA2010-helper|6.64465675|(29)|e=-27|include-units=no link|units=kg}}
Parameter include-units=no with units given anyway
{{CODATA2010-helper|5.97191967|(26)|e=-10|include-units=no|units=J}}
Parameter include-units=no
{{CODATA2010-helper|3727.379240|(82)|include-units=no}}
Parameter include-units omitted when units is set
{{CODATA2010-helper|4.001506179125|(62)|units=u}}
Parameter debug set to the empty string
{{CODATA2010-helper|4.001506179125|(62)|e=-3|units=kg/mol|debug=}}
Parameter debug=yes when all other parameters are set
{{CODATA2010-helper|1.00001495|(90)|e=-10|include-units=no|units=m|debug=yes}}
CODATA2010-helper parameters: {{{1}}}=1.00001495 {{{2}}}=(90) {{{e}}}=-10 {{{include-units}}}=no {{{units}}}=m
Template:Val
Parameter debug=yes when other parameters are unset
{{CODATA2010-helper|7294.2995361|(29)|debug=yes}}
CODATA2010-helper parameters: {{{1}}}=7294.2995361 {{{2}}}=(29) {{{e}}}={{{e}}} {{{include-units}}}={{{include-units}}} {{{units}}}={{{units}}}
Template:Val