~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/basic/new-bound-function.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
var funProto = Function.prototype;
 
2
assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
 
3
 
 
4
function Point(x, y) { this.x = x; this.y = y; }
 
5
 
 
6
var YAxisPoint = Point.bind(null, 0);
 
7
 
 
8
assertEq(YAxisPoint.prototype, undefined);
 
9
 
 
10
var oldPoint;
 
11
for (var i = 0, sz = 9; i < sz; oldPoint = point, i++)
 
12
{
 
13
  var point = new YAxisPoint(5);
 
14
  assertEq(point === oldPoint, false);
 
15
  assertEq(point.x, 0);
 
16
  assertEq(point.y, 5);
 
17
  assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
 
18
  assertEq(Object.getOwnPropertyDescriptor(YAxisPoint, "prototype"), undefined);
 
19
}
 
20