Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Side by Side Diff: Source/wtf/HashMapTest.cpp

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix RenderImage.cpp. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/text/TextBreakIteratorICU.cpp ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ASSERT_TRUE(map.begin() == begin); 48 ASSERT_TRUE(map.begin() == begin);
49 ASSERT_TRUE(begin != map.end()); 49 ASSERT_TRUE(begin != map.end());
50 ASSERT_TRUE(map.end() != begin); 50 ASSERT_TRUE(map.end() != begin);
51 ASSERT_FALSE(begin != map.begin()); 51 ASSERT_FALSE(begin != map.begin());
52 ASSERT_FALSE(map.begin() != begin); 52 ASSERT_FALSE(map.begin() != begin);
53 ASSERT_FALSE(begin == map.end()); 53 ASSERT_FALSE(begin == map.end());
54 ASSERT_FALSE(map.end() == begin); 54 ASSERT_FALSE(map.end() == begin);
55 } 55 }
56 56
57 struct TestDoubleHashTraits : HashTraits<double> { 57 struct TestDoubleHashTraits : HashTraits<double> {
58 static const int minimumTableSize = 8; 58 static const unsigned minimumTableSize = 8;
59 }; 59 };
60 60
61 typedef HashMap<double, int64_t, DefaultHash<double>::Hash, TestDoubleHashTraits > DoubleHashMap; 61 typedef HashMap<double, int64_t, DefaultHash<double>::Hash, TestDoubleHashTraits > DoubleHashMap;
62 62
63 static int bucketForKey(double key) 63 static int bucketForKey(double key)
64 { 64 {
65 return DefaultHash<double>::Hash::hash(key) & (TestDoubleHashTraits::minimum TableSize - 1); 65 return DefaultHash<double>::Hash::hash(key) & (TestDoubleHashTraits::minimum TableSize - 1);
66 } 66 }
67 67
68 TEST(WTF, DoubleHashCollisions) 68 TEST(WTF, DoubleHashCollisions)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ASSERT_EQ(1, map.get(ptr)); 155 ASSERT_EQ(1, map.get(ptr));
156 156
157 ptr.clear(); 157 ptr.clear();
158 ASSERT_FALSE(isDeleted); 158 ASSERT_FALSE(isDeleted);
159 159
160 map.clear(); 160 map.clear();
161 ASSERT_TRUE(isDeleted); 161 ASSERT_TRUE(isDeleted);
162 } 162 }
163 163
164 } // namespace 164 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/text/TextBreakIteratorICU.cpp ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698