Module:Factorization/testcases: Difference between revisions
Appearance
Content deleted Content added
←Created page with '-- Example Unit tests for Module:Factorization. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_factor() self:prepro...' |
(No difference)
|
Revision as of 00:53, 26 April 2013
![]() | This is the test cases page for the module Module:Factorization. Results of the test cases. |
-- Example Unit tests for [[Module:Factorization]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_factor()
self:preprocess_equals('{{#invoke:Factorization | factor | 1}}', '1')
self:preprocess_equals('{{#invoke:Factorization | factor | 2}}', '2')
self:preprocess_equals('{{#invoke:Factorization | factor | 5}}', '5')
self:preprocess_equals('{{#invoke:Factorization | factor | 10}}', '2 \cdot 5')
self:preprocess_equals('{{#invoke:Factorization | factor | 25}}', '5^2')
self:preprocess_equals('{{#invoke:Factorization | factor | 40}}', '2^3 \cdot 5')
self:preprocess_equals('{{#invoke:Factorization | factor | 111}}', '3 \cdot 37')
end
return p