Add a basic stringToUTF16HexString
unit-test
This commit is contained in:
parent
9adc7859c8
commit
7d029f8bfe
@ -23,6 +23,7 @@ import {
|
|||||||
isWhiteSpace,
|
isWhiteSpace,
|
||||||
log2,
|
log2,
|
||||||
parseXFAPath,
|
parseXFAPath,
|
||||||
|
stringToUTF16HexString,
|
||||||
stringToUTF16String,
|
stringToUTF16String,
|
||||||
toRomanNumerals,
|
toRomanNumerals,
|
||||||
validateCSSFont,
|
validateCSSFont,
|
||||||
@ -355,6 +356,18 @@ describe("core_utils", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("stringToUTF16HexString", function () {
|
||||||
|
it("should encode a string in UTF16 hexadecimal format", function () {
|
||||||
|
expect(stringToUTF16HexString("hello world")).toEqual(
|
||||||
|
"00680065006c006c006f00200077006f0072006c0064"
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(stringToUTF16HexString("こんにちは世界の")).toEqual(
|
||||||
|
"30533093306b3061306f4e16754c306e"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("stringToUTF16String", function () {
|
describe("stringToUTF16String", function () {
|
||||||
it("should encode a string in UTF16", function () {
|
it("should encode a string in UTF16", function () {
|
||||||
expect(stringToUTF16String("hello world")).toEqual(
|
expect(stringToUTF16String("hello world")).toEqual(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user