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

Unified Diff: tests/Time.cpp

Issue 1109593002: SkTime: return timezone information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: reorder assignment Created 5 years, 8 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 | « src/ports/SkTime_win.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Time.cpp
diff --git a/tests/Time.cpp b/tests/Time.cpp
index 0139654e1993ec51d711f86d1ff21ea43093c436..60dcd5527cdc5a2f30c8f55655c022323455c219 100644
--- a/tests/Time.cpp
+++ b/tests/Time.cpp
@@ -41,4 +41,16 @@ DEF_TEST(Time_GetDateTime, r) {
REPORTER_ASSERT(r, dateTime.fMinute <= 59);
REPORTER_ASSERT(r, dateTime.fSecond <= 60); // leap seconds are 23:59:60
+
+ // The westernmost timezone is -12:00.
+ // The easternmost timezone is +14:00.
+ REPORTER_ASSERT(r, abs(SkToInt(dateTime.fTimeZoneMinutes)) <= 14 * 60);
+
+ SkString timeStamp;
+ dateTime.toISO8601(&timeStamp);
+ REPORTER_ASSERT(r, timeStamp.size() > 0);
+ if (r->verbose()) { // `dm --veryVerbose`
+ SkDebugf("\nCurrent Time (ISO-8601 format): \"%s\"\n",
+ timeStamp.c_str());
+ }
}
« no previous file with comments | « src/ports/SkTime_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698