diff options
author | Mike Klein <mtklein@chromium.org> | 2018-06-11 11:56:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-14 14:05:27 +0000 |
commit | b6b5b7a8082eddc6b198817ab0ea7d9c9f5dd4e4 (patch) | |
tree | 3eecbd5fa10751253c1ac3ce956f8c2eb8fcebf5 /tests/FitsInTest.cpp | |
parent | bdde428d53ebe0bdf25c0a6048e3872427ef08d3 (diff) |
Reland "simplify SkTFitsIn, try 2"
This is a reland of 009f51e43fee199a579ecdd773e3aa35aaa3b8b8
Original change's description:
> simplify SkTFitsIn, try 2
>
> Originally we wrote this in C++14 constexpr,
> but because this is used from public headers, we can't use
> C++14 yet. Now a somewhat sillier looking C++11 version.
>
> All the old tests still pass, and one new added.
> Updated the comments a bit for correctness and readability.
>
> Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
> Reviewed-on: https://skia-review.googlesource.com/134425
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I99676faac6153830538c1396a325ca1456dfb126
Reviewed-on: https://skia-review.googlesource.com/134800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tests/FitsInTest.cpp')
-rw-r--r-- | tests/FitsInTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/FitsInTest.cpp b/tests/FitsInTest.cpp index 6a46b67bed..5d21b8d347 100644 --- a/tests/FitsInTest.cpp +++ b/tests/FitsInTest.cpp @@ -14,6 +14,8 @@ #define TEST(S, s, D, expected) REPORTER_ASSERT(reporter, (SkTFitsIn<D>((S)(s)) == (expected))) DEF_TEST(FitsIn, reporter) { + TEST(uint16_t, 257, int8_t, false); + TEST(int32_t, 1, int8_t, true); TEST(int32_t, -1, int8_t, true); TEST(int32_t, (int32_t)(std::numeric_limits<int8_t>::max)(), int8_t, true); |