argument-string-unknown-annotation.js (888B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2022 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.zoneddatetime.compare 7 description: Various forms of unknown annotation 8 features: [Temporal] 9 ---*/ 10 11 const tests = [ 12 ["1970-01-01T00:00[UTC][foo=bar]", "with time zone"], 13 ["1970-01-01T00:00[UTC][foo=bar][u-ca=iso8601]", "before calendar"], 14 ["1970-01-01T00:00[UTC][u-ca=iso8601][foo=bar]", "after calendar"], 15 ["1970-01-01T00:00[UTC][foo=bar][_foo-bar0=Ignore-This-999999999999]", "with another unknown annotation"], 16 ]; 17 18 tests.forEach(([arg, description]) => { 19 const result = Temporal.ZonedDateTime.compare(arg, arg); 20 21 assert.sameValue( 22 result, 23 0, 24 `unknown annotation (${description})` 25 ); 26 }); 27 28 reportCompare(0, 0);