summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T1.js
blob: 8c3b6275c198f37054df1af6e1699b57dc090d21 (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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: The Date.prototype property "toDateString" has { DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking absence of ReadOnly attribute
---*/

var x = Date.prototype.toDateString;
if (x === 1) {
  Date.prototype.toDateString = 2;
} else {
  Date.prototype.toDateString = 1;
}

assert.notSameValue(
  Date.prototype.toDateString,
  x,
  'The value of Date.prototype.toDateString is expected to not equal the value of `x`'
);

// TODO: Convert to verifyProperty() format.

reportCompare(0, 0);