summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/__proto__/get-to-obj-abrupt.js
blob: 4a9213e3dae9085dda59744b85fc446c86595786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-object.prototype.__proto__
es6id: B.2.2.1
description: Abrupt completion from ToObject
info: |
    1. Let O be ? ToObject(this value).
features: [__proto__]
---*/

var get = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get;

assert.sameValue(typeof get, 'function');

assert.throws(TypeError, function() {
  get.call(undefined);
});

assert.throws(TypeError, function() {
  get.call(null);
});

reportCompare(0, 0);