mirror of https://github.com/tc39/test262.git
Split deepEqual tests requiring bigint (#2352)
This commit is contained in:
parent
0fd3cf4d24
commit
96d6bd0781
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2019 Ron Buckton. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
primitive BigInt values compare correctly.
|
||||
features: [BigInt]
|
||||
includes: [deepEqual.js]
|
||||
---*/
|
||||
|
||||
assert.deepEqual(1n, 1n);
|
||||
assert.deepEqual(Object(1n), 1n);
|
||||
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(1n, 1); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(1n, 2n); });
|
|
@ -7,6 +7,8 @@ description: >
|
|||
includes: [deepEqual.js]
|
||||
---*/
|
||||
|
||||
/// <reference path="../../harness/assert.js" />
|
||||
/// <reference path="../../harness/deepEqual.js" />
|
||||
|
||||
var s1 = Symbol();
|
||||
var s2 = Symbol();
|
||||
|
@ -14,12 +16,10 @@ assert.deepEqual(null, null);
|
|||
assert.deepEqual(undefined, undefined);
|
||||
assert.deepEqual("a", "a");
|
||||
assert.deepEqual(1, 1);
|
||||
assert.deepEqual(1n, 1n);
|
||||
assert.deepEqual(true, true);
|
||||
assert.deepEqual(s1, s1);
|
||||
assert.deepEqual(Object("a"), "a");
|
||||
assert.deepEqual(Object(1), 1);
|
||||
assert.deepEqual(Object(1n), 1n);
|
||||
assert.deepEqual(Object(true), true);
|
||||
assert.deepEqual(Object(s1), s1);
|
||||
|
||||
|
@ -28,8 +28,6 @@ assert.throws(Test262Error, function () { assert.deepEqual(undefined, 0); });
|
|||
assert.throws(Test262Error, function () { assert.deepEqual("", 0); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual("1", 1); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual("1", "2"); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(1n, 1); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(1n, 2n); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(true, 1); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(true, false); });
|
||||
assert.throws(Test262Error, function () { assert.deepEqual(s1, "Symbol()"); });
|
||||
|
|
Loading…
Reference in New Issue