Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: test/mjsunit/get-own-property-descriptor-non-objects.js

Issue 998163004: [es6] Object.getOwnPropertyDescriptor should wrap primitives (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/v8natives.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 assertThrows(function() {
6 Object.getOwnPropertyDescriptor(null, 'x');
7 }, TypeError);
8
9
10 assertThrows(function() {
11 Object.getOwnPropertyDescriptor(undefined, 'x');
12 }, TypeError);
13
14
15 assertEquals({
16 configurable: false,
17 enumerable: false,
18 value: 3,
19 writable: false,
20 }, Object.getOwnPropertyDescriptor('abc', 'length'));
21
22
23 assertEquals({
24 configurable: false,
25 enumerable: true,
26 value: 'a',
27 writable: false,
28 }, Object.getOwnPropertyDescriptor('abc', 0));
29
30
31 assertSame(undefined, Object.getOwnPropertyDescriptor(42, 'x'));
32 assertSame(undefined, Object.getOwnPropertyDescriptor(true, 'x'));
33 assertSame(undefined, Object.getOwnPropertyDescriptor(false, 'x'));
34 assertSame(undefined, Object.getOwnPropertyDescriptor(Symbol(), 'x'));
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698