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

Unified Diff: tests/Matrix44Test.cpp

Issue 791723006: SkMatrix44(const SkMatrix&) needs to initialize the type mask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « src/utils/SkMatrix44.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Matrix44Test.cpp
diff --git a/tests/Matrix44Test.cpp b/tests/Matrix44Test.cpp
index 13ead192b3609e022c968fbf9727c868f0f7c736..221c37d08093705a842bdbb27fc8f9731d509978 100644
--- a/tests/Matrix44Test.cpp
+++ b/tests/Matrix44Test.cpp
@@ -104,6 +104,14 @@ static void test_constructor(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, testMatrix == placeholderMatrix);
REPORTER_ASSERT(reporter, testMatrix->isIdentity());
REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
+
+ // Verify that that constructing from an SkMatrix initializes everything.
+ SkMatrix44 scaleMatrix(SkMatrix44::kUninitialized_Constructor);
+ scaleMatrix.setScale(3, 4, 5);
+ REPORTER_ASSERT(reporter, scaleMatrix.isScale());
+ testMatrix = new(&scaleMatrix) SkMatrix44(SkMatrix::I());
+ REPORTER_ASSERT(reporter, testMatrix->isIdentity());
+ REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
}
static void test_translate(skiatest::Reporter* reporter) {
« no previous file with comments | « src/utils/SkMatrix44.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698