Przeglądaj źródła

Add test for Win32ErrorMessage

Wei-Yin Chen (陳威尹) 9 lat temu
rodzic
commit
11d6cb56d0

+ 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) {