Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainDate/compare/not-same-object.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.plaindate.compare
7 description: Dates are equal even if they are not the same object
8 features: [Temporal]
9 ---*/
10
11 const date1 = new Temporal.PlainDate(1914, 2, 23);
12 const date2 = new Temporal.PlainDate(1914, 2, 23);
13
14 assert.sameValue(Temporal.PlainDate.compare(date1, date1), 0, "same object");
15 assert.sameValue(Temporal.PlainDate.compare(date1, date2), 0, "same date");
16
17 reportCompare(0, 0);