OLD | NEW |
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" |
11 #include "SkMatrix.h" | 11 #include "SkMatrix.h" |
12 #include "GrRedBlackTree.h" | 12 #include "GrRedBlackTree.h" |
13 | 13 |
14 // FIXME: needs to be in a header | 14 // FIXME: needs to be in a header |
15 void gr_run_unittests(); | 15 void gr_run_unittests(); |
16 | 16 |
17 // If we aren't inheriting these as #defines from elsewhere, | 17 // If we aren't inheriting these as #defines from elsewhere, |
18 // clang demands they be declared before we #include the template | 18 // clang demands they be declared before we #include the template |
19 // that relies on them. | 19 // that relies on them. |
20 #if GR_DEBUG | 20 #if SK_DEBUG |
21 static bool LT(const int& elem, int value) { | 21 static bool LT(const int& elem, int value) { |
22 return elem < value; | 22 return elem < value; |
23 } | 23 } |
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[] = { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 GR_DEBUGCODE(test_bsearch();) | 77 GR_DEBUGCODE(test_bsearch();) |
78 test_binHashKey(); | 78 test_binHashKey(); |
79 GrRedBlackTree<int>::UnitTest(); | 79 GrRedBlackTree<int>::UnitTest(); |
80 } | 80 } |
OLD | NEW |