projects
/
platform
/
upstream
/
js.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 1.0.0
[platform/upstream/js.git]
/
js
/
src
/
jit-test
/
tests
/
closures
/
closure-pluseq.js
1
actual = '';
2
expected = '3,6,9,12,15,18,';
3
4
function slice(a, b)
5
{
6
//return { x: a + ':' + b };
7
return b;
8
}
9
10
function f()
11
{
12
var length = 20;
13
var index = 0;
14
15
function get3() {
16
//appendToActual("get3 " + index);
17
if (length - index < 3)
18
return null;
19
return slice(index, index += 3);
20
}
21
22
var bytes = null;
23
while (bytes = get3()) {
24
appendToActual(bytes);
25
}
26
}
27
28
f();
29
30
31
assertEq(actual, expected)