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

Side by Side Diff: tests/CPlusPlusEleven.cpp

Issue 2278703002: SkPDF: Glyph validation change (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comment Created 4 years, 3 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 | « src/pdf/SkScopeExit.h ('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 2015 Google Inc. 2 * Copyright 2015 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 #include "Test.h" 7 #include "Test.h"
8 #include "SkTemplates.h" 8 #include "SkTemplates.h"
9 #include "SkScopeExit.h"
9 #include <utility> 10 #include <utility>
10 11
11 namespace { 12 namespace {
12 class Moveable { 13 class Moveable {
13 public: 14 public:
14 Moveable() {} 15 Moveable() {}
15 Moveable(Moveable&&) {} 16 Moveable(Moveable&&) {}
16 Moveable& operator=(Moveable&&) { return *this; } 17 Moveable& operator=(Moveable&&) { return *this; }
17 private: 18 private:
18 Moveable(const Moveable&); 19 Moveable(const Moveable&);
(...skipping 29 matching lines...) Expand all
48 }; 49 };
49 } // namespace 50 } // namespace
50 51
51 DEF_TEST(CPlusPlusEleven_default_move, r) { 52 DEF_TEST(CPlusPlusEleven_default_move, r) {
52 TestClass a; 53 TestClass a;
53 TestClass b(a); 54 TestClass b(a);
54 TestClass c(std::move(a)); 55 TestClass c(std::move(a));
55 REPORTER_ASSERT(r, b.fFoo.fCopied); 56 REPORTER_ASSERT(r, b.fFoo.fCopied);
56 REPORTER_ASSERT(r, !c.fFoo.fCopied); 57 REPORTER_ASSERT(r, !c.fFoo.fCopied);
57 } 58 }
59
60 DEF_TEST(SkAtScopeExit, r) {
61 int x = 5;
62 {
63 SK_AT_SCOPE_EXIT(x--);
64 REPORTER_ASSERT(r, x == 5);
65 }
66 REPORTER_ASSERT(r, x == 4);
67 }
OLDNEW
« no previous file with comments | « src/pdf/SkScopeExit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698