Various fixes to Unicode.Scalar.Properties.

- numericValue returns nil instead of .nan for non-numerics
- Remove small-string optimizations from _scalarName that failed on 32-bit archs
- Put case mappings back into U.S.Properties
- Added more sanity tests
This commit is contained in:
Tony Allevato
2018-07-05 20:42:56 -07:00
parent 8eef50f6a9
commit d0e93acb00
5 changed files with 322 additions and 202 deletions

View File

@@ -53,7 +53,6 @@ int32_t unorm2_normalize(const UNormalizer2 *, const UChar *, int32_t, UChar *,
const UNormalizer2 *unorm2_getNFCInstance(UErrorCode *);
UBool unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c);
UBool u_hasBinaryProperty(UChar32, UProperty);
UBool u_isdefined(UChar32);
void u_charAge(UChar32, UVersionInfo);
int32_t u_getIntPropertyValue(UChar32, UProperty);
int32_t u_charName(UChar32, UCharNameChoice, char *, int32_t, UErrorCode *);
@@ -245,11 +244,6 @@ swift::__swift_stdlib_u_hasBinaryProperty(__swift_stdlib_UChar32 c,
return u_hasBinaryProperty(c, static_cast<UProperty>(p));
}
swift::__swift_stdlib_UBool
swift::__swift_stdlib_u_isdefined(UChar32 c) {
return u_isdefined(c);
}
void
swift::__swift_stdlib_u_charAge(__swift_stdlib_UChar32 c,
__swift_stdlib_UVersionInfo versionInfo) {