blob: 4614c746afe0ebdc24d913ca18832980a9a7f4d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// |reftest| skip -- Temporal is not supported
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plainyearmonth.compare
description: Basic tests for compare()
features: [Temporal]
---*/
const nov94 = Temporal.PlainYearMonth.from("1994-11");
const nov94bis = Temporal.PlainYearMonth.from("1994-11");
const jun13 = Temporal.PlainYearMonth.from("2013-06");
assert.sameValue(Temporal.PlainYearMonth.compare(nov94, nov94), 0, "same object");
assert.sameValue(Temporal.PlainYearMonth.compare(nov94, nov94bis), 0, "different object");
assert.sameValue(Temporal.PlainYearMonth.compare(nov94, jun13), -1, "before");
assert.sameValue(Temporal.PlainYearMonth.compare(jun13, nov94), 1, "after");
reportCompare(0, 0);
|