Debian Codegraph @

js/src/tests/non262/Intl/Collator/implicithan.js

raw
1 // |reftest| skip-if(!this.hasOwnProperty("Intl"))
2 /* Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/ */
4
5 let scrambled = ['𠙶', '𠇲', '㓙', '㑧', '假', '凷'];
6
7 // Sort first by block and then by radical-stroke inside each block.
8 // This matches the ICU/ICU4X implicithan root order, which is used
9 // by Chrome as of October 2022. (As of October 2022, Safari uses
10 // the unihan root order, which uses more data but uses radical-stroke
11 // across blocks.)
12 const byBlock = ['假', '凷', '㑧', '㓙', '𠇲', '𠙶'];
13
14 scrambled.sort(new Intl.Collator().compare);
15 assertEqArray(scrambled, byBlock);
16
17 reportCompare(0, 0, 'ok');