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

Unified Diff: tests/CPlusPlusEleven.cpp

Issue 2193973002: SkPDF: PDFShader code modernized. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-02 (Tuesday) 17:24:52 EDT Created 4 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 | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CPlusPlusEleven.cpp
diff --git a/tests/CPlusPlusEleven.cpp b/tests/CPlusPlusEleven.cpp
index b5a34b2264914e9c3b57d6115aa6068f45beab78..3130e6f95bd1edf99cdccd74b600e921abe68ab9 100644
--- a/tests/CPlusPlusEleven.cpp
+++ b/tests/CPlusPlusEleven.cpp
@@ -35,3 +35,23 @@ DEF_TEST(CPlusPlusEleven_constexpr, r) {
static constexpr int y = SkTPin<int>(100, 0, 10);
REPORTER_ASSERT(r, y == 10);
}
+
+namespace {
+struct MoveableCopyable {
+ bool fCopied;
+ MoveableCopyable() : fCopied(false) {}
+ MoveableCopyable(const MoveableCopyable &o) : fCopied(true) {}
+ MoveableCopyable(MoveableCopyable &&o) : fCopied(o.fCopied) {}
+};
+struct TestClass {
+ MoveableCopyable fFoo;
+};
+} // namespace
+
+DEF_TEST(CPlusPlusEleven_default_move, r) {
+ TestClass a;
+ TestClass b(a);
+ TestClass c(std::move(a));
+ REPORTER_ASSERT(r, b.fFoo.fCopied);
+ REPORTER_ASSERT(r, !c.fFoo.fCopied);
+}
« no previous file with comments | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698