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

Side by Side Diff: tests/MatrixTest.cpp

Issue 2002663002: gyp (third_party) warning changes for ccache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « gyp/zlib.gyp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkMath.h" 8 #include "SkMath.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 #include "SkMatrixUtils.h" 10 #include "SkMatrixUtils.h"
(...skipping 24 matching lines...) Expand all
35 if (equal) { 35 if (equal) {
36 bool foundZeroSignDiff = false; 36 bool foundZeroSignDiff = false;
37 for (int i = 0; i < 9; ++i) { 37 for (int i = 0; i < 9; ++i) {
38 float aVal = a.get(i); 38 float aVal = a.get(i);
39 float bVal = b.get(i); 39 float bVal = b.get(i);
40 int aValI = *SkTCast<int*>(&aVal); 40 int aValI = *SkTCast<int*>(&aVal);
41 int bValI = *SkTCast<int*>(&bVal); 41 int bValI = *SkTCast<int*>(&bVal);
42 if (0 == aVal && 0 == bVal && aValI != bValI) { 42 if (0 == aVal && 0 == bVal && aValI != bValI) {
43 foundZeroSignDiff = true; 43 foundZeroSignDiff = true;
44 } else { 44 } else {
45 REPORTER_ASSERT(reporter, aVal == bVal && aValI == aValI); 45 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI);
46 } 46 }
47 } 47 }
48 REPORTER_ASSERT(reporter, foundZeroSignDiff); 48 REPORTER_ASSERT(reporter, foundZeroSignDiff);
49 } else { 49 } else {
50 bool foundNaN = false; 50 bool foundNaN = false;
51 for (int i = 0; i < 9; ++i) { 51 for (int i = 0; i < 9; ++i) {
52 float aVal = a.get(i); 52 float aVal = a.get(i);
53 float bVal = b.get(i); 53 float bVal = b.get(i);
54 int aValI = *SkTCast<int*>(&aVal); 54 int aValI = *SkTCast<int*>(&aVal);
55 int bValI = *SkTCast<int*>(&bVal); 55 int bValI = *SkTCast<int*>(&bVal);
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 a.setTranslate(10, 20); 946 a.setTranslate(10, 20);
947 947
948 SkMatrix b; 948 SkMatrix b;
949 b.setScale(3, 5); 949 b.setScale(3, 5);
950 950
951 SkMatrix expected; 951 SkMatrix expected;
952 expected.setConcat(a,b); 952 expected.setConcat(a,b);
953 953
954 REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b)); 954 REPORTER_ASSERT(r, expected == SkMatrix::Concat(a, b));
955 } 955 }
OLDNEW
« no previous file with comments | « gyp/zlib.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698