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

Side by Side Diff: tools/clang/empty_string/tests/test-original.cc

Issue 2009293002: Cleanup: Pass std::string as const reference from tools/clang/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // Test file for the empty string clang tool. 5 // Test file for the empty string clang tool.
6 6
7 #include <string> 7 #include <string>
8 8
9 // Tests for std::string declarations. 9 // Tests for std::string declarations.
10 void TestDeclarations() { std::string a(""), b("abc"), c(""); } 10 void TestDeclarations() { std::string a(""), b("abc"), c(""); }
(...skipping 14 matching lines...) Expand all
25 TestInitializers(double) : a(""), b("cat"), c() {} 25 TestInitializers(double) : a(""), b("cat"), c() {}
26 26
27 private: 27 private:
28 std::string a; 28 std::string a;
29 std::string b; 29 std::string b;
30 std::string c; 30 std::string c;
31 }; 31 };
32 32
33 // Tests for temporary std::strings. 33 // Tests for temporary std::strings.
34 void TestTemporaries(const std::string& reference_argument, 34 void TestTemporaries(const std::string& reference_argument,
35 const std::string value_argument) { 35 const std::string& value_argument) {
hans 2016/05/25 17:31:25 This file is a test case for the plugin, it's not
ki.stfu 2016/05/25 17:37:58 Thanks for very quick response!
36 TestTemporaries("", ""); 36 TestTemporaries("", "");
37 TestTemporaries(std::string(""), std::string("")); 37 TestTemporaries(std::string(""), std::string(""));
38 } 38 }
39 39
40 // Tests for temporary std::wstrings. 40 // Tests for temporary std::wstrings.
41 void TestWideTemporaries(const std::wstring& reference_argument, 41 void TestWideTemporaries(const std::wstring& reference_argument,
42 const std::wstring value_argument) { 42 const std::wstring& value_argument) {
43 TestWideTemporaries(L"", L""); 43 TestWideTemporaries(L"", L"");
44 TestWideTemporaries(std::wstring(L""), std::wstring(L"")); 44 TestWideTemporaries(std::wstring(L""), std::wstring(L""));
45 } 45 }
46 46
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698