| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 "fx_string_testhelpers.h" | 5 #include "testing/fx_string_testhelpers.h" |
| 6 | 6 |
| 7 #include <ios> | 7 #include <ios> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 template <typename T> | 12 template <typename T> |
| 13 std::ostream& output_string(std::ostream& out, const T& str) { | 13 std::ostream& output_string(std::ostream& out, const T& str) { |
| 14 out << std::hex << std::setfill('0') << '"'; | 14 out << std::hex << std::setfill('0') << '"'; |
| 15 for (size_t i = 0; i < str.GetLength(); ++i) { | 15 for (size_t i = 0; i < str.GetLength(); ++i) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 38 return output_string(out, str); | 38 return output_string(out, str); |
| 39 } | 39 } |
| 40 | 40 |
| 41 std::ostream& operator<<(std::ostream& out, const CFX_WideStringC& str) { | 41 std::ostream& operator<<(std::ostream& out, const CFX_WideStringC& str) { |
| 42 return output_string(out, str); | 42 return output_string(out, str); |
| 43 } | 43 } |
| 44 | 44 |
| 45 std::ostream& operator<<(std::ostream& out, const CFX_WideString& str) { | 45 std::ostream& operator<<(std::ostream& out, const CFX_WideString& str) { |
| 46 return output_string(out, str); | 46 return output_string(out, str); |
| 47 } | 47 } |
| OLD | NEW |