v8/test/mjsunit/es6/math.js
dslomov@chromium.org 08ee4d3a5c Add remaining @@toStringTag symbols to builtins
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/664333003

Patch from Caitlin Potter <caitpotter88@gmail.com>.

Cr-Commit-Position: refs/heads/master@{#24885}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 19:29:10 +00:00

16 lines
515 B
JavaScript

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-tostring
function testMathToString() {
assertEquals('[object Math]', "" + Math);
assertEquals("Math", Math[Symbol.toStringTag]);
var desc = Object.getOwnPropertyDescriptor(Math, Symbol.toStringTag);
assertTrue(desc.configurable);
assertFalse(desc.writable);
assertEquals("Math", desc.value);
}
testMathToString();