diff --git a/source/Ox/js/Async.js b/source/Ox/js/Async.js index 12812624..3b21b844 100644 --- a/source/Ox/js/Async.js +++ b/source/Ox/js/Async.js @@ -95,6 +95,8 @@ 1000 ); + > Ox.nonblockingMap(Ox.range(1000000), Ox.identity, function(r) { Ox.test(r.length, 1000000); }) + undefined @*/ Ox.nonblockingMap = function(collection, iterator, that, callback, ms) { var last = Ox.last(arguments), @@ -163,6 +165,8 @@ } ); + > Ox.parallelMap(Ox.range(1000000), Ox.noop, function(r) { Ox.test(r.length, 1000000); }) + undefined @*/ Ox.parallelMap = function() { asyncMap.apply(null, [Ox.parallelForEach].concat(Ox.toArray(arguments))); @@ -229,9 +233,12 @@ } ); + > Ox.serialMap(Ox.range(1000), Ox.noop, function(r) { Ox.test(r.length, 1000); }) + undefined @*/ Ox.serialMap = function(collection, iterator, that, callback) { asyncMap.apply(null, [Ox.serialForEach].concat(Ox.toArray(arguments))); }; + // FIXME: The above test with 10000 iterations blows the stack }()); diff --git a/source/Ox/js/Encoding.js b/source/Ox/js/Encoding.js index 51b253ca..ba1dcd4f 100644 --- a/source/Ox/js/Encoding.js +++ b/source/Ox/js/Encoding.js @@ -139,7 +139,7 @@ Ox.encodeDeflate Encodes a string, using deflate head, tail and chunk names are removed. (str) -> The encoded string str The string to be encoded - > Ox.decodeDeflate(Ox.encodeDeflate('foo'), function(str) { Ox.test.async('Ox.encodeDeflate', str == 'foo'); }) + > Ox.decodeDeflate(Ox.encodeDeflate('foo'), function(str) { Ox.test(str, 'foo'); }) undefined @*/ Ox.encodeDeflate = function(string, callback) {