Skip to content

Commit

Permalink
[lldb][test] Disable MD5 test for old versions of Visual Studio (llvm…
Browse files Browse the repository at this point in the history
…#94325)

In older versions there is this problem:

https://developercommunity.visualstudio.com/t/c-shared-state-futuresstate-default-constructs-the/60897

Which prevents us making a future out of a result type. There's
no good workaround so just don't compile this for older versions.
  • Loading branch information
DavidSpickett authored Jun 4, 2024
1 parent 31850fa commit 8917739
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,10 @@ TEST_F(GDBRemoteCommunicationClientTest, WriteMemoryTags) {
"E03", false);
}

// Prior to this verison, constructing a std::future for a type without a
// default constructor is not possible.
// https://developercommunity.visualstudio.com/t/c-shared-state-futuresstate-default-constructs-the/60897
#if !defined(_MSC_VER) || _MSC_VER >= 1932
TEST_F(GDBRemoteCommunicationClientTest, CalculateMD5) {
FileSpec file_spec("/foo/bar", FileSpec::Style::posix);
std::future<ErrorOr<MD5::MD5Result>> async_result = std::async(
Expand All @@ -614,3 +618,4 @@ TEST_F(GDBRemoteCommunicationClientTest, CalculateMD5) {
EXPECT_EQ(expected_low, result->low());
EXPECT_EQ(expected_high, result->high());
}
#endif

0 comments on commit 8917739

Please sign in to comment.