Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 5146) sorted by relevance

12345678910>>...206

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAtomicLongMapTest.java34 AtomicLongMap<Object> map = AtomicLongMap.create(); in testNulls() local
35 tester.testAllPublicInstanceMethods(map); in testNulls()
40 AtomicLongMap<String> map = AtomicLongMap.create(in); in testCreate_map() local
41 assertFalse(map.isEmpty()); in testCreate_map()
42 assertSame(3, map.size()); in testCreate_map()
43 assertTrue(map.containsKey("1")); in testCreate_map()
44 assertTrue(map.containsKey("2")); in testCreate_map()
45 assertTrue(map.containsKey("3")); in testCreate_map()
46 assertEquals(1L, map.get("1")); in testCreate_map()
47 assertEquals(2L, map.get("2")); in testCreate_map()
[all …]
/external/guava/guava-testlib/src/com/google/common/collect/testing/
DConcurrentMapInterfaceTest.java71 final ConcurrentMap<K, V> map; in testPutIfAbsentNewKey() local
75 map = makeEitherMap(); in testPutIfAbsentNewKey()
82 int initialSize = map.size(); in testPutIfAbsentNewKey()
83 V oldValue = map.putIfAbsent(keyToPut, valueToPut); in testPutIfAbsentNewKey()
84 assertEquals(valueToPut, map.get(keyToPut)); in testPutIfAbsentNewKey()
85 assertTrue(map.containsKey(keyToPut)); in testPutIfAbsentNewKey()
86 assertTrue(map.containsValue(valueToPut)); in testPutIfAbsentNewKey()
87 assertEquals(initialSize + 1, map.size()); in testPutIfAbsentNewKey()
91 map.putIfAbsent(keyToPut, valueToPut); in testPutIfAbsentNewKey()
97 assertInvariants(map); in testPutIfAbsentNewKey()
[all …]
DMapInterfaceTest.java154 protected final boolean supportsValuesHashCode(Map<K, V> map) { in supportsValuesHashCode() argument
156 Collection<V> values = map.values(); in supportsValuesHashCode()
178 protected final void assertInvariants(Map<K, V> map) { in assertInvariants() argument
179 Set<K> keySet = map.keySet(); in assertInvariants()
180 Collection<V> valueCollection = map.values(); in assertInvariants()
181 Set<Entry<K, V>> entrySet = map.entrySet(); in assertInvariants()
183 assertEquals(map.size() == 0, map.isEmpty()); in assertInvariants()
184 assertEquals(map.size(), keySet.size()); in assertInvariants()
190 V value = map.get(key); in assertInvariants()
192 assertTrue(map.containsKey(key)); in assertInvariants()
[all …]
/external/linux-tools-perf/perf-3.12.0/tools/perf/util/
Dmap.h27 struct map { struct
44 u64 (*map_ip)(struct map *, u64); argument
46 u64 (*unmap_ip)(struct map *, u64); argument
63 static inline struct kmap *map__kmap(struct map *map) in map__kmap() argument
65 return (struct kmap *)(map + 1); in map__kmap()
68 static inline u64 map__map_ip(struct map *map, u64 ip) in map__map_ip() argument
70 return ip - map->start + map->pgoff; in map__map_ip()
73 static inline u64 map__unmap_ip(struct map *map, u64 ip) in map__unmap_ip() argument
75 return ip + map->start - map->pgoff; in map__unmap_ip()
78 static inline u64 identity__map_ip(struct map *map __maybe_unused, u64 ip) in identity__map_ip()
[all …]
Dmap.c34 void map__init(struct map *map, enum map_type type, in map__init() argument
37 map->type = type; in map__init()
38 map->start = start; in map__init()
39 map->end = end; in map__init()
40 map->pgoff = pgoff; in map__init()
41 map->dso = dso; in map__init()
42 map->map_ip = map__map_ip; in map__init()
43 map->unmap_ip = map__unmap_ip; in map__init()
44 RB_CLEAR_NODE(&map->rb_node); in map__init()
45 map->groups = NULL; in map__init()
[all …]
/external/chromium_org/third_party/angle/src/libGLESv2/renderer/d3d/d3d11/
Dformatutils11.cpp23 typedef std::map<DXGI_FORMAT, GLenum> DXGIToESFormatMap;
25 inline void AddDXGIToESEntry(DXGIToESFormatMap *map, DXGI_FORMAT key, GLenum value) in AddDXGIToESEntry() argument
27 map->insert(std::make_pair(key, value)); in AddDXGIToESEntry()
32 DXGIToESFormatMap map; in BuildDXGIToESFormatMap() local
34 AddDXGIToESEntry(&map, DXGI_FORMAT_UNKNOWN, GL_NONE); in BuildDXGIToESFormatMap()
36 AddDXGIToESEntry(&map, DXGI_FORMAT_A8_UNORM, GL_ALPHA8_EXT); in BuildDXGIToESFormatMap()
37 AddDXGIToESEntry(&map, DXGI_FORMAT_R8_UNORM, GL_R8); in BuildDXGIToESFormatMap()
38 AddDXGIToESEntry(&map, DXGI_FORMAT_R8G8_UNORM, GL_RG8); in BuildDXGIToESFormatMap()
39 AddDXGIToESEntry(&map, DXGI_FORMAT_R8G8B8A8_UNORM, GL_RGBA8); in BuildDXGIToESFormatMap()
40 AddDXGIToESEntry(&map, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, GL_SRGB8_ALPHA8); in BuildDXGIToESFormatMap()
[all …]
/external/qemu/android/utils/
Dintmap.c42 AIntMap* map; in aintMap_new() local
44 ANEW0(map); in aintMap_new()
45 map->size = 0; in aintMap_new()
46 map->capacity = 4; in aintMap_new()
47 map->keys = map->keys0; in aintMap_new()
48 map->values = map->values0; in aintMap_new()
50 return map; in aintMap_new()
54 aintMap_free( AIntMap* map ) in aintMap_free() argument
56 if (map) { in aintMap_free()
57 if (map->keys != map->keys0) in aintMap_free()
[all …]
/external/chromium_org/chromeos/system/
Dname_value_pairs_parser_unittest.cc14 NameValuePairsParser::NameValueMap map; in TEST() local
15 NameValuePairsParser parser(&map); in TEST()
19 ASSERT_EQ(1U, map.size()); in TEST()
20 EXPECT_EQ("Foo", map["foo"]); in TEST()
24 NameValuePairsParser::NameValueMap map; in TEST() local
25 NameValuePairsParser parser(&map); in TEST()
28 EXPECT_EQ(3U, map.size()); in TEST()
29 EXPECT_EQ("Foo", map["foo"]); in TEST()
30 EXPECT_EQ("Bar", map["bar"]); in TEST()
31 EXPECT_EQ("FooBar", map["foobar"]); in TEST()
[all …]
/external/chromium_org/extensions/browser/
Dprocess_map_unittest.cc12 ProcessMap map; in TEST() local
15 EXPECT_FALSE(map.Contains("a", 1)); in TEST()
16 EXPECT_FALSE(map.Remove("a", 1, 1)); in TEST()
17 EXPECT_EQ(0u, map.size()); in TEST()
20 EXPECT_TRUE(map.Insert("a", 1, 1)); in TEST()
21 EXPECT_TRUE(map.Contains("a", 1)); in TEST()
22 EXPECT_FALSE(map.Contains("a", 2)); in TEST()
23 EXPECT_FALSE(map.Contains("b", 1)); in TEST()
24 EXPECT_EQ(1u, map.size()); in TEST()
27 EXPECT_FALSE(map.Insert("a", 1, 1)); in TEST()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_keymap.c67 default_delete_func(const struct keymap *map, in default_delete_func() argument
113 struct keymap *map = MALLOC_STRUCT(keymap); in util_new_keymap() local
114 if (!map) in util_new_keymap()
117 map->cso = cso_hash_create(); in util_new_keymap()
118 if (!map->cso) { in util_new_keymap()
119 FREE(map); in util_new_keymap()
123 map->max_entries = maxEntries; in util_new_keymap()
124 map->num_entries = 0; in util_new_keymap()
125 map->key_size = keySize; in util_new_keymap()
126 map->delete_func = deleteFunc ? deleteFunc : default_delete_func; in util_new_keymap()
[all …]
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/util/
Du_keymap.c67 default_delete_func(const struct keymap *map, in default_delete_func() argument
113 struct keymap *map = MALLOC_STRUCT(keymap); in util_new_keymap() local
114 if (!map) in util_new_keymap()
117 map->cso = cso_hash_create(); in util_new_keymap()
118 if (!map->cso) { in util_new_keymap()
119 FREE(map); in util_new_keymap()
123 map->max_entries = maxEntries; in util_new_keymap()
124 map->num_entries = 0; in util_new_keymap()
125 map->key_size = keySize; in util_new_keymap()
126 map->delete_func = deleteFunc ? deleteFunc : default_delete_func; in util_new_keymap()
[all …]
/external/chromium_org/third_party/libaddressinput/src/java/test/com/android/i18n/addressinput/
DJsoMapTest.java52 JsoMap map = JsoMap.buildJsoMap(VALID_JSON); in testDelKey() local
54 assertEquals("b", map.get("a")); in testDelKey()
55 map.delKey("a"); in testDelKey()
56 assertNull(map.get("a")); in testDelKey()
58 map.delKey("b"); in testDelKey()
59 map.delKey("c"); in testDelKey()
60 map.delKey("d"); in testDelKey()
64 JsoMap map = JsoMap.buildJsoMap(VALID_JSON); in testGet() local
65 assertEquals("b", map.get("a")); in testGet()
66 assertNull(map.get("b")); in testGet()
[all …]
/external/chromium_org/net/disk_cache/blockfile/
Dbitmap_unittest.cc19 disk_cache::Bitmap map; in TEST() local
20 EXPECT_EQ(0, map.Size()); in TEST()
21 EXPECT_EQ(0, map.ArraySize()); in TEST()
22 EXPECT_TRUE(NULL == map.GetMap()); in TEST()
59 disk_cache::Bitmap map(kSize, true); in TEST() local
61 map.Toggle(i); in TEST()
63 map.Toggle(i); in TEST()
65 EXPECT_EQ((i % 3 == 0) && (i % 9 != 0), map.Get(i)); in TEST()
72 disk_cache::Bitmap map(kSize1, true); in TEST() local
73 map.Resize(kSize1, true); in TEST()
[all …]
/external/chromium_org/third_party/tcmalloc/chromium/src/tests/
Dpagemap_unittest.cc69 Type map(malloc); in TestMap() local
71 map.Ensure(i, 1); in TestMap()
72 map.set(i, (void*)(i+1)); in TestMap()
73 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
76 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
81 Type map(malloc); in TestMap() local
82 map.Ensure(0, limit); in TestMap()
84 map.set(i, (void*)(i+1)); in TestMap()
85 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
88 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
[all …]
/external/chromium_org/third_party/tcmalloc/vendor/src/tests/
Dpagemap_unittest.cc69 Type map(malloc); in TestMap() local
71 map.Ensure(i, 1); in TestMap()
72 map.set(i, (void*)(i+1)); in TestMap()
73 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
76 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
81 Type map(malloc); in TestMap() local
82 map.Ensure(0, limit); in TestMap()
84 map.set(i, (void*)(i+1)); in TestMap()
85 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
88 CHECK_EQ(map.get(i), (void*)(i+1)); in TestMap()
[all …]
/external/llvm/unittests/ADT/
DIntervalMapTest.cpp22 UUMap map(allocator); in TEST() local
23 EXPECT_TRUE(map.empty()); in TEST()
26 EXPECT_EQ(0u, map.lookup(0)); in TEST()
27 EXPECT_EQ(7u, map.lookup(0, 7)); in TEST()
28 EXPECT_EQ(0u, map.lookup(~0u-1)); in TEST()
29 EXPECT_EQ(7u, map.lookup(~0u-1, 7)); in TEST()
32 EXPECT_TRUE(map.begin() == map.begin()); in TEST()
33 EXPECT_TRUE(map.begin() == map.end()); in TEST()
34 EXPECT_TRUE(map.end() == map.end()); in TEST()
35 EXPECT_FALSE(map.begin() != map.begin()); in TEST()
[all …]
/external/chromium_org/components/copresence/
Dtimed_map_unittest.cc37 Map map(base::TimeDelta::FromSeconds(9999), 3); in TEST_F() local
39 EXPECT_FALSE(map.HasKey(0)); in TEST_F()
40 EXPECT_EQ(0, map.GetValue(0).value); in TEST_F()
42 map.Add(0x1337, Value(0x7331)); in TEST_F()
43 EXPECT_TRUE(map.HasKey(0x1337)); in TEST_F()
44 EXPECT_EQ(0x7331, map.GetValue(0x1337).value); in TEST_F()
46 map.Add(0xbaad, Value(0xf00d)); in TEST_F()
47 EXPECT_TRUE(map.HasKey(0xbaad)); in TEST_F()
48 EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); in TEST_F()
49 EXPECT_EQ(0x7331, map.GetValue(0x1337).value); in TEST_F()
[all …]
/external/chromium_org/base/
Did_map_unittest.cc24 IDMap<TestObject> map; in TEST() local
25 EXPECT_TRUE(map.IsEmpty()); in TEST()
26 EXPECT_EQ(0U, map.size()); in TEST()
31 int32 id1 = map.Add(&obj1); in TEST()
32 EXPECT_FALSE(map.IsEmpty()); in TEST()
33 EXPECT_EQ(1U, map.size()); in TEST()
34 EXPECT_EQ(&obj1, map.Lookup(id1)); in TEST()
36 int32 id2 = map.Add(&obj2); in TEST()
37 EXPECT_FALSE(map.IsEmpty()); in TEST()
38 EXPECT_EQ(2U, map.size()); in TEST()
[all …]
/external/chromium_org/chrome/browser/
Dinternal_auth_unittest.cc36 std::map<std::string, std::string> map; in TEST_F() local
37 map["key"] = "value"; in TEST_F()
39 "zapata", map); in TEST_F()
42 map["key2"] = "value2"; in TEST_F()
43 token = InternalAuthGeneration::GeneratePassport("zapata", map); in TEST_F()
48 std::map<std::string, std::string> map; in TEST_F() local
49 map["key"] = "value"; in TEST_F()
51 "zapata", map); in TEST_F()
55 "zapata", map); in TEST_F()
62 std::map<std::string, std::string> map; in TEST_F() local
[all …]
/external/chromium_org/third_party/WebKit/Source/wtf/
DHashMapTest.cpp41 IntHashMap map; in TEST() local
42 map.add(1, 2); in TEST()
43 EXPECT_TRUE(map.begin() != map.end()); in TEST()
44 EXPECT_FALSE(map.begin() == map.end()); in TEST()
46 IntHashMap::const_iterator begin = map.begin(); in TEST()
47 EXPECT_TRUE(begin == map.begin()); in TEST()
48 EXPECT_TRUE(map.begin() == begin); in TEST()
49 EXPECT_TRUE(begin != map.end()); in TEST()
50 EXPECT_TRUE(map.end() != begin); in TEST()
51 EXPECT_FALSE(begin != map.begin()); in TEST()
[all …]
/external/chromium_org/third_party/angle/src/libGLESv2/
Dformatutils.cpp32 typedef std::map<FormatTypePair, FormatType> FormatMap;
35 static inline void InsertFormatMapping(FormatMap *map, GLenum format, GLenum type, GLenum internalF… in InsertFormatMapping() argument
40 map->insert(FormatPair(FormatTypePair(format, type), info)); in InsertFormatMapping()
45 FormatMap map; in BuildFormatMap() local
50 …InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA8, … in BuildFormatMap()
51 …InsertFormatMapping(&map, GL_RGBA, GL_BYTE, GL_RGBA8_SNORM… in BuildFormatMap()
52 …InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_RGBA4, … in BuildFormatMap()
53 …InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_RGB5_A1, … in BuildFormatMap()
54 …InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_RGB10_A2, … in BuildFormatMap()
55 …InsertFormatMapping(&map, GL_RGBA, GL_FLOAT, GL_RGBA32F, … in BuildFormatMap()
[all …]
/external/chromium_org/base/files/
Dmemory_mapped_file_unittest.cc60 MemoryMappedFile map; in TEST_F() local
61 map.Initialize(temp_file_path()); in TEST_F()
62 ASSERT_EQ(kFileSize, map.length()); in TEST_F()
63 ASSERT_TRUE(map.data() != NULL); in TEST_F()
64 EXPECT_TRUE(map.IsValid()); in TEST_F()
65 ASSERT_TRUE(CheckBufferContents(map.data(), kFileSize, 0)); in TEST_F()
71 MemoryMappedFile map; in TEST_F() local
72 map.Initialize(File(temp_file_path(), File::FLAG_OPEN | File::FLAG_READ)); in TEST_F()
73 ASSERT_EQ(kFileSize, map.length()); in TEST_F()
74 ASSERT_TRUE(map.data() != NULL); in TEST_F()
[all …]
/external/libunwind/src/
Dos-hpux.c59 map = map_find_from_addr(as->map_list, ip); in tdep_get_elf_image()
60 if (map) in tdep_get_elf_image()
67 map = map_find_from_addr(as->map_list, ip); in tdep_get_elf_image()
68 if (map) in tdep_get_elf_image()
79 map = mempool_alloc (&map_pool); in tdep_get_elf_image()
80 if (!map) in tdep_get_elf_image()
83 map->start = lmd.text_base; in tdep_get_elf_image()
84 map->end = cur_map->start + lmd.text_size; in tdep_get_elf_image()
85 map->offset = 0; /* XXX fix me? */ in tdep_get_elf_image()
86 map->flags = ; in tdep_get_elf_image()
[all …]
/external/chromium_org/content/common/dom_storage/
Ddom_storage_map_unittest.cc26 scoped_refptr<DOMStorageMap> map(new DOMStorageMap(kQuota)); in TEST() local
33 EXPECT_EQ(0u, map->Length()); in TEST()
34 EXPECT_TRUE(map->Key(0).is_null()); in TEST()
35 EXPECT_TRUE(map->Key(100).is_null()); in TEST()
36 EXPECT_TRUE(map->GetItem(kKey).is_null()); in TEST()
37 EXPECT_FALSE(map->RemoveItem(kKey, &old_value)); in TEST()
38 EXPECT_EQ(0u, map->bytes_used()); in TEST()
39 copy = map->DeepCopy(); in TEST()
42 map->SwapValues(&swap); in TEST()
46 EXPECT_TRUE(map->SetItem(kKey, kValue, &old_nullable_value)); in TEST()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DForwardingConcurrentMapTest.java41 TestMap map = new TestMap(); in testPutIfAbsent() local
42 map.put("foo", 1); in testPutIfAbsent()
43 assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2)); in testPutIfAbsent()
44 assertEquals(Integer.valueOf(1), map.get("foo")); in testPutIfAbsent()
45 assertNull(map.putIfAbsent("bar", 3)); in testPutIfAbsent()
46 assertEquals(Integer.valueOf(3), map.get("bar")); in testPutIfAbsent()
50 TestMap map = new TestMap(); in testRemove() local
51 map.put("foo", 1); in testRemove()
52 assertFalse(map.remove("foo", 2)); in testRemove()
53 assertFalse(map.remove("bar", 1)); in testRemove()
[all …]

12345678910>>...206