mirror of https://github.com/google/googletest.git
Merge b769fc08a4 into 283c17563f
This commit is contained in:
commit
e5a95563de
|
|
@ -4648,7 +4648,7 @@ std::string JsonUnitTestResultPrinter::EscapeJson(const std::string& str) {
|
|||
m << "\\r";
|
||||
break;
|
||||
default:
|
||||
if (ch < ' ') {
|
||||
if (static_cast<unsigned char>(ch) < ' ') {
|
||||
m << "\\u00" << String::FormatByte(static_cast<unsigned char>(ch));
|
||||
} else {
|
||||
m << ch;
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ EXPECTED_NON_EMPTY = {
|
|||
'time': '*',
|
||||
'timestamp': '*',
|
||||
'classname': 'PropertyRecordingTest',
|
||||
'key_1': '1',
|
||||
'key_1': 'caf\u00e9 \u4e2d',
|
||||
},
|
||||
{
|
||||
'name': 'IntValuedProperty',
|
||||
|
|
@ -878,7 +878,7 @@ class GTestJsonOutputUnitTest(gtest_test_utils.TestCase):
|
|||
'the expected exit code %s.'
|
||||
% (command, p.exit_code, expected_exit_code),
|
||||
)
|
||||
with open(json_path) as f:
|
||||
with open(json_path, encoding='utf-8') as f:
|
||||
actual = json.load(f)
|
||||
return actual
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ It is good practice to tell why you skip a test.
|
|||
</properties>
|
||||
<testcase name="OneProperty" file="gtest_xml_output_unittest_.cc" line="125" status="run" result="completed" time="*" timestamp="*" classname="PropertyRecordingTest">
|
||||
<properties>
|
||||
<property name="key_1" value="1"/>
|
||||
<property name="key_1" value="caf\u00e9 \u4e2d"/>
|
||||
</properties>
|
||||
</testcase>
|
||||
<testcase name="IntValuedProperty" file="gtest_xml_output_unittest_.cc" line="129" status="run" result="completed" time="*" timestamp="*" classname="PropertyRecordingTest">
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class PropertyRecordingTest : public Test {
|
|||
};
|
||||
|
||||
TEST_F(PropertyRecordingTest, OneProperty) {
|
||||
RecordProperty("key_1", "1");
|
||||
RecordProperty("key_1", "caf\xC3\xA9 \xE4\xB8\xAD");
|
||||
}
|
||||
|
||||
TEST_F(PropertyRecordingTest, IntValuedProperty) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue