Hmm, I'm not sure if we should fix this one. The error message expected in ...
13 years, 4 months ago
(2010-12-09 14:52:55 UTC)
#1
Hmm, I'm not sure if we should fix this one.
The error message expected in the unittest is locale dependent (generated by the
OS). So this test failed in my zh-CN windows 7 machine..
How about calling Subprocess::Win32ErrorMessage() (google/protobuf/compiler/subprocess.h) to generate the expected message from the expected error code? ...
13 years, 4 months ago
(2010-12-09 18:31:44 UTC)
#2
How about calling Subprocess::Win32ErrorMessage()
(google/protobuf/compiler/subprocess.h) to generate the expected message
from the expected error code?
On Thu, Dec 9, 2010 at 6:52 AM, <liujisi@google.com> wrote:
> Reviewers: kenton,
>
> Message:
> Hmm, I'm not sure if we should fix this one.
>
> The error message expected in the unittest is locale dependent
> (generated by the OS). So this test failed in my zh-CN windows 7
> machine..
>
>
>
> Please review this at http://codereview.appspot.com/3542041/
>
> Affected files:
> M src/google/protobuf/compiler/command_line_interface_unittest.cc
>
>
> Index: src/google/protobuf/compiler/command_line_interface_unittest.cc
> ===================================================================
> --- src/google/protobuf/compiler/command_line_interface_unittest.cc
> (revision 360)
> +++ src/google/protobuf/compiler/command_line_interface_unittest.cc
> (working copy)
> @@ -1140,9 +1140,7 @@
> "--proto_path=$tmpdir error.proto");
>
> #ifdef _WIN32
> - ExpectErrorSubstring(
> - "--badplug_out: prefix-gen-badplug: The system cannot find the file
> "
> - "specified.");
> + ExpectErrorSubstring("--badplug_out: prefix-gen-badplug:");
> #else
> // Error written to stdout by child process after exec() fails.
> ExpectErrorSubstring(
>
>
>
Issue 3542041: Remove the OS/local dependent error message checking in unittest
Created 13 years, 4 months ago by Jisi Liu
Modified 13 years, 4 months ago
Reviewers: kenton
Base URL: http://protobuf.googlecode.com/svn/trunk/
Comments: 0