Skip to content

//base/win32:hresult_test fails if the UI locale is not English #1420

@yukawa

Description

@yukawa

Description

HResultTest.ToString in //base/win32:hresult_test fails if the UI locale is not English.

Steps to reproduce

  1. Make sure the UI language is Japanese
  2. bazelisk test --config oss_windows -c dbg //base/win32:hresult_test --nocache_test_results --test_output=streamed

Expected behavior

The test succeeds.

Actual behavior

The test fails with the following error:

[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from HResultTest
[ RUN      ] HResultTest.ErrorCodes
[       OK ] HResultTest.ErrorCodes (0 ms)
[ RUN      ] HResultTest.ReturnIfErrorHResult
[       OK ] HResultTest.ReturnIfErrorHResult (0 ms)
[ RUN      ] HResultTest.ToString
base/win32/hresult_test.cc(95): error: Expected equality of these values:
  ss.str()
    Which is: "Failure: \xE6\x97\xA2\xE3\x81\xAB\xE5\xAD\x98\xE5\x9C\xA8\xE3\x81\x99\xE3\x82\x8B\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\xE3\x82\x92\xE4\xBD\x9C\xE6\x88\x90\xE3\x81\x99\xE3\x82\x8B\xE3\x81\x93\xE3\x81\xA8\xE3\x81\xAF\xE3\x81\xA7\xE3\x81\x8D\xE3\x81\xBE\xE3\x81\x9B\xE3\x82\x93\xE3\x80\x82 (0x800700b7)"
    As Text: "Failure: 既に存在するファイルを作成することはできません。 (0x800700b7)"
  "Failure: Cannot create a file when that file already " "exists. (0x800700b7)"
    Which is: "Failure: Cannot create a file when that file already exists. (0x800700b7)"

[  FAILED  ] HResultTest.ToString (0 ms)
[----------] 3 tests from HResultTest (0 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (0 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] HResultTest.ToString

 1 FAILED TEST

Version or commit-id

d91f278

Environment

  • OS: Windows 11 25H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions