summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/indexof-equal.js
blob: f6e3256048e99270d7c0966ce49198c5cb004ddd (plain)
1
2
3
4
5
6
7
8
9
10
var x = "abc";
assertEq(x.indexOf(x), 0);
assertEq(x.indexOf(x, -1), 0);
assertEq(x.indexOf(x, 1), -1);
assertEq(x.indexOf(x, 100), -1);

assertEq(x.lastIndexOf(x), 0);
assertEq(x.lastIndexOf(x, -1), 0);
assertEq(x.lastIndexOf(x, 1), 0);
assertEq(x.lastIndexOf(x, 100), 0);