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

Side by Side Diff: tests/ClampRangeTest.cpp

Issue 22875037: My clang now doesn't complain about !"foo". (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « tests/AAClipTest.cpp ('k') | tests/PathTest.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 2011 Google Inc. 3 * Copyright 2011 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 #include "Test.h" 8 #include "Test.h"
9 #include "gradients/SkClampRange.h" 9 #include "gradients/SkClampRange.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 fx += dx; 58 fx += dx;
59 } 59 }
60 } else { 60 } else {
61 for (i = 0; i < range.fCount0; i++) { 61 for (i = 0; i < range.fCount0; i++) {
62 int v = classify_value(fx, V0, V1); 62 int v = classify_value(fx, V0, V1);
63 R_ASSERT(v == range.fV0); 63 R_ASSERT(v == range.fV0);
64 fx += dx; 64 fx += dx;
65 } 65 }
66 if (range.fCount1 > 0 && fx != range.fFx1) { 66 if (range.fCount1 > 0 && fx != range.fFx1) {
67 SkDebugf("%x %x\n", fx, range.fFx1); 67 SkDebugf("%x %x\n", fx, range.fFx1);
68 R_ASSERT(!"bad fFx1"); 68 R_ASSERT(false); // bad fFx1
69 return; 69 return;
70 } 70 }
71 for (i = 0; i < range.fCount1; i++) { 71 for (i = 0; i < range.fCount1; i++) {
72 R_ASSERT(fx >= 0 && fx <= 0xFFFF); 72 R_ASSERT(fx >= 0 && fx <= 0xFFFF);
73 fx += dx; 73 fx += dx;
74 } 74 }
75 for (i = 0; i < range.fCount2; i++) { 75 for (i = 0; i < range.fCount2; i++) {
76 int v = classify_value(fx, V0, V1); 76 int v = classify_value(fx, V0, V1);
77 R_ASSERT(v == range.fV1); 77 R_ASSERT(v == range.fV1);
78 fx += dx; 78 fx += dx;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 test_range(fx, dx, count); 126 test_range(fx, dx, count);
127 } 127 }
128 } 128 }
129 129
130 #ifdef USE_REPORTER 130 #ifdef USE_REPORTER
131 131
132 #include "TestClassDef.h" 132 #include "TestClassDef.h"
133 DEFINE_TESTCLASS("ClampRange", ClampRangeClass, TestClampRange) 133 DEFINE_TESTCLASS("ClampRange", ClampRangeClass, TestClampRange)
134 134
135 #endif 135 #endif
OLDNEW
« no previous file with comments | « tests/AAClipTest.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698