summaryrefslogtreecommitdiff
path: root/test/built-ins/Error/prototype/toString/15.11.4.4-6-2.js
blob: c10b3a9f69b68457ba51f0aa22782f7299f6ceab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.11.4.4-6-2
description: >
    Error.prototype.toString - 'Error' is returned when 'name' is
    absent and value of 'msg' is returned when 'msg' is non-empty
    string
---*/

var errObj = new Error("ErrorMessage");

assert.sameValue(errObj.toString(), "Error: ErrorMessage", 'errObj.toString()');