Index: tests/Time.cpp |
diff --git a/tests/Time.cpp b/tests/Time.cpp |
index 65c01e26ffc2136e706fa941ceb57579cb85af30..0139654e1993ec51d711f86d1ff21ea43093c436 100644 |
--- a/tests/Time.cpp |
+++ b/tests/Time.cpp |
@@ -14,10 +14,21 @@ DEF_TEST(Time_GetDateTime, r) { |
SkTime::GetDateTime(&dateTime); |
// TODO(future generation): update these values. |
- const uint16_t kMinimumSaneYear = 2014; |
+ const uint16_t kMinimumSaneYear = 1964; |
const uint16_t kMaximumSaneYear = 2064; |
- REPORTER_ASSERT(r, dateTime.fYear >= kMinimumSaneYear); |
- REPORTER_ASSERT(r, dateTime.fYear <= kMaximumSaneYear); |
+ |
+ if (dateTime.fYear < kMinimumSaneYear) { |
+ ERRORF(r, |
+ "SkTime::GetDateTime: %u (CurrentYear) < %u (MinimumSaneYear)", |
+ static_cast<unsigned>(dateTime.fYear), |
+ static_cast<unsigned>(kMinimumSaneYear)); |
+ } |
+ if (dateTime.fYear > kMaximumSaneYear) { |
+ ERRORF(r, |
+ "SkTime::GetDateTime: %u (CurrentYear) > %u (MaximumSaneYear)", |
+ static_cast<unsigned>(dateTime.fYear), |
+ static_cast<unsigned>(kMaximumSaneYear)); |
+ } |
REPORTER_ASSERT(r, dateTime.fMonth >= 1); |
REPORTER_ASSERT(r, dateTime.fMonth <= 12); |