Home | History | Annotate | Download | only in fde

Lines Matching defs:buf_

14     buf_ = pdfium::MakeUnique<CFDE_TxtEdtBuf>();
15 buf_->SetChunkSizeForTesting(5);
17 size_t ChunkCount() const { return buf_->m_chunks.size(); }
19 std::unique_ptr<CFDE_TxtEdtBuf> buf_;
23 buf_->SetText(L"Hi");
25 EXPECT_EQ(2, buf_->GetTextLength());
27 CFX_WideString res = buf_->GetText();
33 buf_->SetText(L"Hi");
36 buf_->Insert(2, end.c_str(), end.GetLength());
38 EXPECT_EQ(8, buf_->GetTextLength());
40 CFX_WideString res = buf_->GetText();
46 buf_->SetText(L"Hi");
49 buf_->Insert(0, end.c_str(), end.GetLength());
51 EXPECT_EQ(8, buf_->GetTextLength());
53 CFX_WideString res = buf_->GetText();
59 buf_->SetText(L"Hello World");
63 buf_->Insert(6, inst.c_str(), inst.GetLength());
65 EXPECT_EQ(17, buf_->GetTextLength());
67 CFX_WideString res = buf_->GetText();
73 buf_->SetText(L"Hello World");
74 EXPECT_EQ(11, buf_->GetTextLength());
76 buf_->SetText(L"Hi");
79 EXPECT_EQ(2, buf_->GetTextLength());
81 CFX_WideString res = buf_->GetText();
87 buf_->SetText(L"Hello there World");
88 buf_->Delete(6, 6);
90 EXPECT_EQ(11, buf_->GetTextLength());
92 CFX_WideString res = buf_->GetText();
98 buf_->SetText(L"Hello World");
99 buf_->Delete(5, 6);
101 EXPECT_EQ(5, buf_->GetTextLength());
103 CFX_WideString res = buf_->GetText();
109 buf_->SetText(L"Hello World");
110 buf_->Delete(0, 6);
112 EXPECT_EQ(5, buf_->GetTextLength());
114 CFX_WideString res = buf_->GetText();
120 buf_->SetText(L"Hello World");
121 buf_->Delete(0, 11);
123 EXPECT_EQ(0, buf_->GetTextLength());
125 CFX_WideString res = buf_->GetText();
131 buf_->SetText(L"Hello World");
132 buf_->Clear(true);
134 EXPECT_EQ(0, buf_->GetTextLength());
136 CFX_WideString res = buf_->GetText();
142 buf_->SetText(L"Hello World");
143 buf_->Clear(false);
145 EXPECT_EQ(0, buf_->GetTextLength());
147 CFX_WideString res = buf_->GetText();
153 buf_->SetText(L"Hello world");
154 EXPECT_EQ(L"e", CFX_WideString(buf_->GetCharByIndex(1)));
155 EXPECT_EQ(L"o", CFX_WideString(buf_->GetCharByIndex(7)));
159 buf_->SetText(L"Hello World");
160 EXPECT_EQ(L"", buf_->GetRange(1, 0));
161 EXPECT_EQ(L"ello", buf_->GetRange(1, 4));
162 EXPECT_EQ(L"lo Wo", buf_->GetRange(3, 5));
171 buf_->SetText(L"Hi");
172 EXPECT_DEATH(buf_->Insert(-4, inst.c_str(), inst.GetLength()), "Assertion");
173 EXPECT_DEATH(buf_->Insert(9999, inst.c_str(), inst.GetLength()), "Assertion");
174 EXPECT_DEATH(buf_->Insert(1, inst.c_str(), -6), "Assertion");
178 buf_->SetText(L"Hi");
179 EXPECT_DEATH(buf_->Delete(-10, 4), "Assertion");
180 EXPECT_DEATH(buf_->Delete(1, -5), "Assertion");
181 EXPECT_DEATH(buf_->Delete(5, 1), "Assertion");
182 EXPECT_DEATH(buf_->Delete(0, 10000), "Assertion");
186 buf_->SetText(L"Hi");
187 EXPECT_DEATH(buf_->GetCharByIndex(-1), "Assertion");
188 EXPECT_DEATH(buf_->GetCharByIndex(100), "Assertion");
192 buf_->SetText(L"Hi");
193 EXPECT_DEATH(buf_->GetRange(1, -1), "Assertion");
194 EXPECT_DEATH(buf_->GetRange(-1, 1), "Assertion");
195 EXPECT_DEATH(buf_->GetRange(10, 1), "Assertion");
196 EXPECT_DEATH(buf_->GetRange(1, 100), "Assertion");