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

Side by Side Diff: src/gpu/gr_unittests.cpp

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int Created 7 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrTextStrike_impl.h ('k') | src/images/SkImageDecoder_libwebp.cpp » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrBinHashKey.h" 9 #include "GrBinHashKey.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 13 matching lines...) Expand all
24 static bool EQ(const int& elem, int value) { 24 static bool EQ(const int& elem, int value) {
25 return elem == value; 25 return elem == value;
26 } 26 }
27 #include "GrTBSearch.h" 27 #include "GrTBSearch.h"
28 28
29 static void test_bsearch() { 29 static void test_bsearch() {
30 const int array[] = { 30 const int array[] = {
31 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99 31 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99
32 }; 32 };
33 33
34 for (size_t n = 0; n < GR_ARRAY_COUNT(array); n++) { 34 for (int n = 0; n < static_cast<int>(GR_ARRAY_COUNT(array)); ++n) {
35 for (size_t i = 0; i < n; i++) { 35 for (int i = 0; i < n; i++) {
36 int index = GrTBSearch<int, int>(array, n, array[i]); 36 int index = GrTBSearch<int, int>(array, n, array[i]);
37 SkASSERT(index == (int) i); 37 SkASSERT(index == (int) i);
38 index = GrTBSearch<int, int>(array, n, -array[i]); 38 index = GrTBSearch<int, int>(array, n, -array[i]);
39 SkASSERT(index < 0); 39 SkASSERT(index < 0);
40 } 40 }
41 } 41 }
42 } 42 }
43 #endif 43 #endif
44 44
45 // bogus empty class for GrBinHashKey 45 // bogus empty class for GrBinHashKey
(...skipping 25 matching lines...) Expand all
71 SkASSERT(keyA.compare(keyB) < 0); 71 SkASSERT(keyA.compare(keyB) < 0);
72 SkASSERT(keyA.getHash() != keyB.getHash()); 72 SkASSERT(keyA.getHash() != keyB.getHash());
73 } 73 }
74 74
75 75
76 void gr_run_unittests() { 76 void gr_run_unittests() {
77 SkDEBUGCODE(test_bsearch();) 77 SkDEBUGCODE(test_bsearch();)
78 test_binHashKey(); 78 test_binHashKey();
79 GrRedBlackTree<int>::UnitTest(); 79 GrRedBlackTree<int>::UnitTest();
80 } 80 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextStrike_impl.h ('k') | src/images/SkImageDecoder_libwebp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698