aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-05-23 09:11:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-23 09:11:59 -0700
commita0af771612db5ae36b74f1f536bfb335ecd0ec99 (patch)
tree5bce33c400039d9a5a39d08269dd574e69858735 /tests
parentf0270c32c1c4024f60788265518fec103de4b4eb (diff)
SkTypes: use constexpr when appropriate
Diffstat (limited to 'tests')
-rw-r--r--tests/CPlusPlusEleven.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/CPlusPlusEleven.cpp b/tests/CPlusPlusEleven.cpp
index 5fbd46429d..b5a34b2264 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);
+}