5#include "core/fxcrt/code_point_view.h"
9#include "build/build_config.h"
10#include "testing/gtest/include/gtest/gtest.h"
14using ::pdfium::CodePointView;
17 std::u32string materialized;
18 for (
char32_t code_point : view) {
19 materialized += code_point;
27 EXPECT_EQ(U"", Materialize(CodePointView(L"")));
31 EXPECT_EQ(U"(\u0080\uffff)", Materialize(CodePointView(L"(\u0080\uffff)")));
35 EXPECT_EQ(U"(🎨)", Materialize(CodePointView(L"(🎨)")));
39 EXPECT_EQ(U"\xd800", Materialize(CodePointView(L"\xd800")));
43 EXPECT_EQ(U"\xdc00", Materialize(CodePointView(L"\xdc00")));
46#if defined(WCHAR_T_IS_16_BIT)
47TEST(CodePointViewTest, SurrogateErrorRecovery) {
48 EXPECT_EQ(U"(\xd800)", Materialize(CodePointView(L"(\xd800)"))) <<
"High";
49 EXPECT_EQ(U"(\xdc00)", Materialize(CodePointView(L"(\xdc00)"))) <<
"Low";
50 EXPECT_EQ(U"(\xd800🎨)", Materialize(CodePointView(L"(\xd800\xd83c\xdfa8)")))
52 EXPECT_EQ(U"(🎨\xdc00)", Materialize(CodePointView(L"(\xd83c\xdfa8\xdc00)")))
TEST(FXCRYPT, MD5GenerateEmtpyData)