Fix new gdb-remote client unit test for windows
authorPavel Labath <labath@google.com>
Fri, 9 Sep 2016 09:49:54 +0000 (09:49 +0000)
committerPavel Labath <labath@google.com>
Fri, 9 Sep 2016 09:49:54 +0000 (09:49 +0000)
The behaviour of FileSpec differed between host OS versions. Hardcode the path
syntax to posix, as we don't care about that in this test.

llvm-svn: 281025

lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp

index 1fa24c9..618055f 100644 (file)
@@ -196,8 +196,9 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo) {
 
   llvm::Triple triple("i386-pc-linux");
 
-  FileSpec file_specs[] = {FileSpec("/foo/bar.so", false),
-                           FileSpec("/foo/baz.so", false)};
+  FileSpec file_specs[] = {
+      FileSpec("/foo/bar.so", false, FileSpec::ePathSyntaxPosix),
+      FileSpec("/foo/baz.so", false, FileSpec::ePathSyntaxPosix)};
   std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
       std::async(std::launch::async,
                  [&] { return client.GetModulesInfo(file_specs, triple); });
@@ -226,7 +227,7 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfoInvalidResponse) {
     return;
 
   llvm::Triple triple("i386-pc-linux");
-  FileSpec file_spec("/foo/bar.so", false);
+  FileSpec file_spec("/foo/bar.so", false, FileSpec::ePathSyntaxPosix);
 
   const char *invalid_responses[] = {
       "OK", "E47", "[]",