use simplified async test syntax
This commit is contained in:
parent
ba4086bc55
commit
b44b2da4d2
2 changed files with 8 additions and 1 deletions
|
@ -95,6 +95,8 @@
|
|||
1000
|
||||
);
|
||||
</script>
|
||||
> 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 @@
|
|||
}
|
||||
);
|
||||
</script>
|
||||
> 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 @@
|
|||
}
|
||||
);
|
||||
</script>
|
||||
> 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
|
||||
|
||||
}());
|
||||
|
|
|
@ -139,7 +139,7 @@ Ox.encodeDeflate <f> Encodes a string, using deflate
|
|||
head, tail and chunk names are removed.
|
||||
(str) -> <s> The encoded string
|
||||
str <s> 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) {
|
||||
|
|
Loading…
Reference in a new issue