Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/property-escapes/generated/Noncharacter_Code_Point.js

raw
1 // Copyright 2024 Mathias Bynens. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 author: Mathias Bynens
6 description: >
7 Unicode property escapes for `Noncharacter_Code_Point`
8 info: |
9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
10 Unicode v16.0.0
11 esid: sec-static-semantics-unicodematchproperty-p
12 features: [regexp-unicode-property-escapes]
13 includes: [regExpUtils.js]
14 ---*/
15
16 const matchSymbols = buildString({
17 loneCodePoints: [],
18 ranges: [
19 [0x00FDD0, 0x00FDEF],
20 [0x00FFFE, 0x00FFFF],
21 [0x01FFFE, 0x01FFFF],
22 [0x02FFFE, 0x02FFFF],
23 [0x03FFFE, 0x03FFFF],
24 [0x04FFFE, 0x04FFFF],
25 [0x05FFFE, 0x05FFFF],
26 [0x06FFFE, 0x06FFFF],
27 [0x07FFFE, 0x07FFFF],
28 [0x08FFFE, 0x08FFFF],
29 [0x09FFFE, 0x09FFFF],
30 [0x0AFFFE, 0x0AFFFF],
31 [0x0BFFFE, 0x0BFFFF],
32 [0x0CFFFE, 0x0CFFFF],
33 [0x0DFFFE, 0x0DFFFF],
34 [0x0EFFFE, 0x0EFFFF],
35 [0x0FFFFE, 0x0FFFFF],
36 [0x10FFFE, 0x10FFFF]
37 ]
38 });
39 testPropertyEscapes(
40 /^\p{Noncharacter_Code_Point}+$/u,
41 matchSymbols,
42 "\\p{Noncharacter_Code_Point}"
43 );
44 testPropertyEscapes(
45 /^\p{NChar}+$/u,
46 matchSymbols,
47 "\\p{NChar}"
48 );
49
50 const nonMatchSymbols = buildString({
51 loneCodePoints: [],
52 ranges: [
53 [0x00DC00, 0x00DFFF],
54 [0x000000, 0x00DBFF],
55 [0x00E000, 0x00FDCF],
56 [0x00FDF0, 0x00FFFD],
57 [0x010000, 0x01FFFD],
58 [0x020000, 0x02FFFD],
59 [0x030000, 0x03FFFD],
60 [0x040000, 0x04FFFD],
61 [0x050000, 0x05FFFD],
62 [0x060000, 0x06FFFD],
63 [0x070000, 0x07FFFD],
64 [0x080000, 0x08FFFD],
65 [0x090000, 0x09FFFD],
66 [0x0A0000, 0x0AFFFD],
67 [0x0B0000, 0x0BFFFD],
68 [0x0C0000, 0x0CFFFD],
69 [0x0D0000, 0x0DFFFD],
70 [0x0E0000, 0x0EFFFD],
71 [0x0F0000, 0x0FFFFD],
72 [0x100000, 0x10FFFD]
73 ]
74 });
75 testPropertyEscapes(
76 /^\P{Noncharacter_Code_Point}+$/u,
77 nonMatchSymbols,
78 "\\P{Noncharacter_Code_Point}"
79 );
80 testPropertyEscapes(
81 /^\P{NChar}+$/u,
82 nonMatchSymbols,
83 "\\P{NChar}"
84 );
85
86 reportCompare(0, 0);