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

Side by Side Diff: crypto/openssl_bio_string_unittest.cc

Issue 1312203002: Include BoringSSL headers from third_party/ in crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « crypto/openssl_bio_string.cc ('k') | crypto/openssl_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/openssl_bio_string.h" 5 #include "crypto/openssl_bio_string.h"
6 6
7 #include <openssl/bio.h>
8
9 #include "crypto/scoped_openssl_types.h" 7 #include "crypto/scoped_openssl_types.h"
10 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/boringssl/src/include/openssl/bio.h"
11 10
12 namespace crypto { 11 namespace crypto {
13 12
14 TEST(OpenSSLBIOString, TestWrite) { 13 TEST(OpenSSLBIOString, TestWrite) {
15 std::string s; 14 std::string s;
16 const std::string expected1("a one\nb 2\n"); 15 const std::string expected1("a one\nb 2\n");
17 const std::string expected2("c d e f"); 16 const std::string expected2("c d e f");
18 const std::string expected3("g h i"); 17 const std::string expected3("g h i");
19 { 18 {
20 ScopedBIO bio(BIO_new_string(&s)); 19 ScopedBIO bio(BIO_new_string(&s));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 EXPECT_EQ(std::string(), s); 53 EXPECT_EQ(std::string(), s);
55 54
56 EXPECT_EQ(static_cast<int>(expected2.size()), 55 EXPECT_EQ(static_cast<int>(expected2.size()),
57 BIO_write(bio.get(), expected2.data(), expected2.size())); 56 BIO_write(bio.get(), expected2.data(), expected2.size()));
58 EXPECT_EQ(expected2, s); 57 EXPECT_EQ(expected2, s);
59 } 58 }
60 EXPECT_EQ(expected2, s); 59 EXPECT_EQ(expected2, s);
61 } 60 }
62 61
63 } // namespace crypto 62 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/openssl_bio_string.cc ('k') | crypto/openssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698