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

Side by Side Diff: tests/Matrix44Test.cpp

Issue 27044002: Clean up SkTypes.h. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: For patch -p1. 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 | « tests/MathTest.cpp ('k') | tests/MatrixTest.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 * 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 "Test.h" 8 #include "Test.h"
9 #include "SkMatrix44.h" 9 #include "SkMatrix44.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 REPORTER_ASSERT(reporter, data[12] == m12); 57 REPORTER_ASSERT(reporter, data[12] == m12);
58 REPORTER_ASSERT(reporter, data[13] == m13); 58 REPORTER_ASSERT(reporter, data[13] == m13);
59 REPORTER_ASSERT(reporter, data[14] == m14); 59 REPORTER_ASSERT(reporter, data[14] == m14);
60 REPORTER_ASSERT(reporter, data[15] == m15); 60 REPORTER_ASSERT(reporter, data[15] == m15);
61 } 61 }
62 62
63 static bool nearly_equal(const SkMatrix44& a, const SkMatrix44& b) { 63 static bool nearly_equal(const SkMatrix44& a, const SkMatrix44& b) {
64 for (int i = 0; i < 4; ++i) { 64 for (int i = 0; i < 4; ++i) {
65 for (int j = 0; j < 4; ++j) { 65 for (int j = 0; j < 4; ++j) {
66 if (!nearly_equal_mscalar(a.get(i, j), b.get(i, j))) { 66 if (!nearly_equal_mscalar(a.get(i, j), b.get(i, j))) {
67 printf("not equal %g %g\n", a.get(i, j), b.get(i, j)); 67 SkDebugf("not equal %g %g\n", a.get(i, j), b.get(i, j));
68 return false; 68 return false;
69 } 69 }
70 } 70 }
71 } 71 }
72 return true; 72 return true;
73 } 73 }
74 74
75 static bool is_identity(const SkMatrix44& m) { 75 static bool is_identity(const SkMatrix44& m) {
76 SkMatrix44 identity; 76 SkMatrix44 identity;
77 identity.reset(); 77 identity.reset();
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 test_get_set_double(reporter); 620 test_get_set_double(reporter);
621 test_set_row_col_major(reporter); 621 test_set_row_col_major(reporter);
622 test_translate(reporter); 622 test_translate(reporter);
623 test_scale(reporter); 623 test_scale(reporter);
624 test_map2(reporter); 624 test_map2(reporter);
625 test_3x3_conversion(reporter); 625 test_3x3_conversion(reporter);
626 } 626 }
627 627
628 #include "TestClassDef.h" 628 #include "TestClassDef.h"
629 DEFINE_TESTCLASS("Matrix44", Matrix44TestClass, TestMatrix44) 629 DEFINE_TESTCLASS("Matrix44", Matrix44TestClass, TestMatrix44)
OLDNEW
« no previous file with comments | « tests/MathTest.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698