blob: 673be4b97e88e0b195b0cca53652998ef280996d [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// 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// ES6 21.2.4.1
6var proto_desc = Object.getOwnPropertyDescriptor(RegExp, "prototype");
7assertFalse(proto_desc.writable);
8assertFalse(proto_desc.enumerable);
9assertFalse(proto_desc.configurable);
10
11// ES6 21.2.5.1
12var proto = proto_desc.value;
13assertFalse(proto instanceof RegExp);
14assertEquals(undefined, Object.getOwnPropertyDescriptor(proto, "valueOf"));
15assertEquals(proto.valueOf, Object.prototype.valueOf);
16var proto_constr = Object.getOwnPropertyDescriptor(proto, "constructor");
17assertEquals(RegExp, proto_constr.value);