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

Unified Diff: tests/MatrixTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/MatrixClipCollapseTest.cpp ('k') | tests/MemsetTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MatrixTest.cpp
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 2296b8f2b526495100b0fc0147b2de4fef683e61..57e79576b0e1405034961ecebdf5db43ae3cb3a2 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -142,7 +142,7 @@ static void test_flatten(skiatest::Reporter* reporter, const SkMatrix& m) {
// add 100 in case we have a bug, I don't want to kill my stack in the test
static const size_t kBufferSize = SkMatrix::kMaxFlattenSize + 100;
char buffer[kBufferSize];
- size_t size1 = m.writeToMemory(NULL);
+ size_t size1 = m.writeToMemory(nullptr);
size_t size2 = m.writeToMemory(buffer);
REPORTER_ASSERT(reporter, size1 == size2);
REPORTER_ASSERT(reporter, size1 <= SkMatrix::kMaxFlattenSize);
@@ -497,7 +497,7 @@ static void test_matrix_decomposition(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2));
REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
// make sure it doesn't crash if we pass in NULLs
- REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, NULL, NULL, NULL));
+ REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, nullptr, nullptr, nullptr));
// rotation only
mat.setRotate(kRotation0);
@@ -711,7 +711,7 @@ static void test_matrix_homogeneous(skiatest::Reporter* reporter) {
// doesn't crash with null dst, src, count == 0
{
- mats[0].mapHomogeneousPoints(NULL, NULL, 0);
+ mats[0].mapHomogeneousPoints(nullptr, nullptr, 0);
}
// uniform scale of point
@@ -822,7 +822,7 @@ DEF_TEST(Matrix, reporter) {
mat.setScale(SkIntToScalar(3), SkIntToScalar(5), SkIntToScalar(20), 0);
mat.postRotate(SkIntToScalar(25));
- REPORTER_ASSERT(reporter, mat.invert(NULL));
+ REPORTER_ASSERT(reporter, mat.invert(nullptr));
REPORTER_ASSERT(reporter, mat.invert(&inverse));
iden1.setConcat(mat, inverse);
REPORTER_ASSERT(reporter, is_identity(iden1));
@@ -832,17 +832,17 @@ DEF_TEST(Matrix, reporter) {
test_flatten(reporter, iden2);
mat.setScale(0, SK_Scalar1);
- REPORTER_ASSERT(reporter, !mat.invert(NULL));
+ REPORTER_ASSERT(reporter, !mat.invert(nullptr));
REPORTER_ASSERT(reporter, !mat.invert(&inverse));
mat.setScale(SK_Scalar1, 0);
- REPORTER_ASSERT(reporter, !mat.invert(NULL));
+ REPORTER_ASSERT(reporter, !mat.invert(nullptr));
REPORTER_ASSERT(reporter, !mat.invert(&inverse));
// Inverting this matrix results in a non-finite matrix
mat.setAll(0.0f, 1.0f, 2.0f,
0.0f, 1.0f, -3.40277175e+38f,
1.00003040f, 1.0f, 0.0f);
- REPORTER_ASSERT(reporter, !mat.invert(NULL));
+ REPORTER_ASSERT(reporter, !mat.invert(nullptr));
REPORTER_ASSERT(reporter, !mat.invert(&inverse));
// rectStaysRect test
« no previous file with comments | « tests/MatrixClipCollapseTest.cpp ('k') | tests/MemsetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698