summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/string-concat-short.js
blob: a0108df0445581567fad5f5e7fc8f7dc348f2ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function f() {
    var res = 0;
    for (var i=0; i<100; i++) {
	var s = "test" + i;
	res += s.length;
	assertEq(s[0], "t");
	assertEq(s[3], "t");
	if (i > 90)
	    assertEq(s[4], "9");
    }
    return res;
}
assertEq(f(), 590);