diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it.t | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,7 +3,6 @@ # Tests for it.class - # # tests for it::match() # @@ -415,3 +414,7 @@ is(it::mod(-9, 4), 3); is(it::mod(-8, 4), 0); is(it::mod(0, 4), 0); is(it::mod(7, 4), 3); + +is(it::map('5*$k+$v', array(1, 2)), array(1, 7)); +is(it::map(create_function('$k,$v', 'return 5*$k+$v;'), array(1, 2)), array(1, 7)); +is(it::map(function($k, $v) {return 5*$k+$v;}, array(1, 2)), array(1, 7)); |