+} // end anonymous namespace
+
+namespace llvm {
+
+template <>
+class StringMapEntryInitializer<uint32_t> {
+public:
+ template <typename InitTy>
+ static void Initialize(StringMapEntry<uint32_t> &T, InitTy InitVal) {
+ T.second = InitVal;
+ }
+};
+
+} // end llvm namespace
+
+namespace {
+
+// Test StringMapEntry::Create() method.
+TEST_F(StringMapTest, StringMapEntryTest) {
+ StringMap<uint32_t>::value_type* entry =
+ StringMap<uint32_t>::value_type::Create(
+ testKeyFirst, testKeyFirst + testKeyLength, 1u);
+ EXPECT_STREQ(testKey, entry->first());
+ EXPECT_EQ(1u, entry->second);
+ free(entry);
+}
+
+// Test insert() method.
+TEST_F(StringMapTest, InsertTest) {
+ SCOPED_TRACE("InsertTest");
+ testMap.insert(
+ StringMap<uint32_t>::value_type::Create(
+ testKeyFirst, testKeyFirst + testKeyLength,
+ testMap.getAllocator(), 1u));
+ assertSingleItemMap();