summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DateTimeFormat/prototype/this-value-datetimeformat-prototype.js
blob: 34db44141b246d890233bc70f28b60ab9b0ac698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2012 Google Inc.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-properties-of-intl-datetimeformat-prototype-object
description: >
    Tests that Intl.DateTimeFormat.prototype is not an object that has
    been initialized as an Intl.DateTimeFormat.
author: Roozbeh Pournader
---*/

// test by calling a function that should fail as "this" is not an object
// initialized as an Intl.DateTimeFormat
assert.throws(TypeError, () => Intl.DateTimeFormat.prototype.format(0),
              "Intl.DateTimeFormat's prototype is not an object that has been initialized as an Intl.DateTimeFormat");

reportCompare(0, 0);