diff options
author | Christian Helbling | 2016-05-23 17:27:25 +0200 |
---|---|---|
committer | Christian Helbling | 2016-05-23 17:27:25 +0200 |
commit | 64f760c1483ad1b34c79557faa5fc27c2d86103d (patch) | |
tree | 1b4d1c5241f381a0982cdccea9966656f5362c3d /tests/it.t | |
parent | 2bb032b36bd7314c7cf478805dec4f30e5624496 (diff) | |
download | itools-64f760c1483ad1b34c79557faa5fc27c2d86103d.tar.gz itools-64f760c1483ad1b34c79557faa5fc27c2d86103d.tar.bz2 itools-64f760c1483ad1b34c79557faa5fc27c2d86103d.zip |
add it::mod which returns modulo as a positive number
Diffstat (limited to 'tests/it.t')
-rwxr-xr-x | tests/it.t | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -410,3 +410,8 @@ foreach (array($dummy, false, true, null, 1, "a", "Ä", "/", array()) as $var) is(it::sort(array("2!","19!","1!")), array("1!", "19!", "2!")); is(it::sort(array("2!","19!","1!"), "r"), array("2!", "19!", "1!")); is(it::sort(array("2!","19!","1!"), "rn"), array("19!", "2!", "1!")); + +is(it::mod(-9, 4), 3); +is(it::mod(-8, 4), 0); +is(it::mod(0, 4), 0); +is(it::mod(7, 4), 3); |