14 auto dict = pdfium::MakeRetain<CPDF_Dictionary>();
15 dict->SetNewFor<CPDF_Dictionary>(
"the-dictionary");
16 dict->SetNewFor<CPDF_Array>(
"the-array");
17 dict->SetNewFor<CPDF_Number>(
"the-number", 42);
20 auto it = locked_dict.begin();
21 EXPECT_NE(it, locked_dict.end());
22 EXPECT_EQ(it->first, ByteString
("the-array"));
23 EXPECT_TRUE(it->second->IsArray());
26 EXPECT_NE(it, locked_dict.end());
27 EXPECT_EQ(it->first, ByteString
("the-dictionary"));
28 EXPECT_TRUE(it->second->IsDictionary());
31 EXPECT_NE(it, locked_dict.end());
32 EXPECT_EQ(it->first, ByteString
("the-number"));
33 EXPECT_TRUE(it->second->IsNumber());
36 EXPECT_EQ(it, locked_dict.end());