Шаблон:UnitTest
Перейти к навигации
Перейти к поиску
Документация Документация, указанная ниже, находится на странице «Шаблон:UnitTest/док». (править | история)
[обновить]
См. также этот шаблон на английском языке: Template:UnitTest. В нём может содержаться более полная или подробная информация.
This simple helper template facilitates unit tests. It is to be used in template documentation and will categorize the page in Category:Шаблоны, вызвавшие ошибку при работе с UnitTest if the unit test fails.
Usage
{{ unitTest | <expected result> | <actual result> }}
- First unnamed parameter
Expected result, i.e. the hardcoded template output.
- Second unnamed parameter
Actual result, i.e. the transclusion of the template.
Examples
Code | Result |
---|---|
{{unitTest| 10 | {{sum|2|8}} }}
|
10 |
{{unitTest| 11 | {{sum|2|8}} }}
|
10 ОШИБКА! (ожидаемое значение: 11) |