浏览代码

Add test for Win32ErrorMessage

Wei-Yin Chen (陳威尹) 9 年之前
父节点
当前提交
11d6cb56d0
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/google/protobuf/compiler/command_line_interface_unittest.cc

+ 5 - 0
src/google/protobuf/compiler/command_line_interface_unittest.cc

@@ -719,6 +719,11 @@ TEST_F(CommandLineInterfaceTest, TrailingBackslash) {
   ExpectGenerated("test_generator", "", "foo.proto", "Foo");
 }
 
+TEST_F(CommandLineInterfaceTest, Win32ErrorMessage) {
+  EXPECT_EQ("The system cannot find the file specified.\r\n",
+    Subprocess::Win32ErrorMessage(ERROR_FILE_NOT_FOUND));
+}
+
 #endif  // defined(_WIN32) || defined(__CYGWIN__)
 
 TEST_F(CommandLineInterfaceTest, PathLookup) {