Debian Codegraph @

rhino/testsrc/tests/ecma/Date/15.9.1.13-1.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = '15.9.1.13-1.js';
7
8 /**
9 File Name: 15.9.1.13-1.js
10 ECMA Section: 15.9.1.1 MakeDate(day, time)
11 Description:
12
13 The operator MakeDate calculates a number of milliseconds from its
14 two arguments, which must be ECMAScript number values. This
15 operator functions as follows:
16
17 1. If day is not finite or time is not finite, return NaN.
18
19 2. Compute day * msPerDay + time.
20
21 3. Return Result(2).
22 */
23
24 new TestCase( SECTION,
25 "MakeDate(Number.POSITIVE_INFINITY, 0)",
26 Number.NaN,
27 MakeDate(Number.POSITIVE_INFINITY, 0));
28
29 new TestCase( SECTION,
30 "MakeDate(Number.NEGATIVE_INFINITY, 0)",
31 Number.NaN,
32 MakeDate(Number.NEGATIVE_INFINITY, 0));
33
34 new TestCase( SECTION,
35 "MakeDate(0, Number.POSITIVE_INFINITY)",
36 Number.NaN,
37 MakeDate(0, Number.POSITIVE_INFINITY));
38
39 new TestCase( SECTION,
40 "MakeDate(0, Number.NEGATIVE_INFINITY)",
41 Number.NaN,
42 MakeDate(0, Number.NEGATIVE_INFINITY));
43
44 test();
45