Module:Factorization/testcases
Appearance
![]() | 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