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

Unified Diff: tests/CPlusPlusEleven.cpp

Issue 2004073002: SkTypes: use constexpr when appropriate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-05-23 (Monday) 11:56:10 EDT Created 4 years, 7 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 | « include/core/SkTypes.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 5fbd46429d1373ca09281644e8dc9ee4c665ce9a..b5a34b2264914e9c3b57d6115aa6068f45beab78 100644
--- a/tests/CPlusPlusEleven.cpp
+++ b/tests/CPlusPlusEleven.cpp
@@ -28,3 +28,10 @@ DEF_TEST(CPlusPlusEleven_RvalueAndMove, r) {
Moveable src1; Moveable dst1(std::move(src1));
Moveable src2, dst2; dst2 = std::move(src2);
}
+
+DEF_TEST(CPlusPlusEleven_constexpr, r) {
+ static constexpr int x = Sk32ToBool(50);
+ REPORTER_ASSERT(r, x == 1);
+ static constexpr int y = SkTPin<int>(100, 0, 10);
+ REPORTER_ASSERT(r, y == 10);
+}
« no previous file with comments | « include/core/SkTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698