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

Unified Diff: crypto/nss_util_unittest.cc

Issue 956613002: Reland "Cut down /crypto and switch what is left of it to boringssl". (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase. Created 5 years, 10 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 | « crypto/nss_util_internal.h ('k') | crypto/openssl_bio_string.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/nss_util_unittest.cc
diff --git a/crypto/nss_util_unittest.cc b/crypto/nss_util_unittest.cc
deleted file mode 100644
index 28591916d3f65f0762a9d1e941f56f4219263fa9..0000000000000000000000000000000000000000
--- a/crypto/nss_util_unittest.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "crypto/nss_util.h"
-
-#include <prtime.h>
-
-#include "base/time/time.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace crypto {
-
-TEST(NSSUtilTest, PRTimeConversion) {
- EXPECT_EQ(base::Time::UnixEpoch(), PRTimeToBaseTime(0));
- EXPECT_EQ(0, BaseTimeToPRTime(base::Time::UnixEpoch()));
-
- PRExplodedTime prxtime;
- prxtime.tm_params.tp_gmt_offset = 0;
- prxtime.tm_params.tp_dst_offset = 0;
- base::Time::Exploded exploded;
- exploded.year = prxtime.tm_year = 2011;
- exploded.month = 12;
- prxtime.tm_month = 11;
- // PRExplodedTime::tm_wday is a smaller type than Exploded::day_of_week, so
- // assigning the two in this order instead of the reverse avoids potential
- // warnings about type downcasting.
- exploded.day_of_week = prxtime.tm_wday = 0; // Should be unused.
- exploded.day_of_month = prxtime.tm_mday = 10;
- exploded.hour = prxtime.tm_hour = 2;
- exploded.minute = prxtime.tm_min = 52;
- exploded.second = prxtime.tm_sec = 19;
- exploded.millisecond = 342;
- prxtime.tm_usec = 342000;
-
- PRTime pr_time = PR_ImplodeTime(&prxtime);
- base::Time base_time = base::Time::FromUTCExploded(exploded);
-
- EXPECT_EQ(base_time, PRTimeToBaseTime(pr_time));
- EXPECT_EQ(pr_time, BaseTimeToPRTime(base_time));
-}
-
-} // namespace crypto
« no previous file with comments | « crypto/nss_util_internal.h ('k') | crypto/openssl_bio_string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698