summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Boolean/prototype/S15.6.3.1_A1.js
blob: 506250ab6f0992a112acb09667730767c20ff868 (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
25
26
27
28
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    The initial value of Boolean.prototype is the Boolean
    prototype object
esid: sec-boolean.prototype
description: Checking Boolean.prototype property
---*/

assert.sameValue(
  typeof Boolean.prototype,
  "object",
  'The value of `typeof Boolean.prototype` is expected to be "object"'
);

assert(Boolean.prototype == false, 'The value of Boolean.prototype is expected to be false');

delete Boolean.prototype.toString;

assert.sameValue(
  Boolean.prototype.toString(),
  "[object Boolean]",
  'Boolean.prototype.toString() must return "[object Boolean]"'
);

reportCompare(0, 0);