Fix ut crash issue introduced in PR#1274 (#1286)

# Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).

- [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [x] Doxygen docs
- [x] Unit tests
- [x] No unwanted commits/changes
- [x] Descriptive title/description
  - [x] PR is single purpose
  - [x] Related issue listed
- [x] Comments in source
- [x] No typos
- [x] Update changelog
- [x] Not work-in-progress
- [x] External references or docs updated
- [x] Self review of PR done
- [x] Any breaking changes?
This commit is contained in:
JinmingHu 2021-01-08 12:03:11 +08:00 committed by GitHub
parent f2d3befda1
commit 280bad5b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -208,7 +208,7 @@ namespace Azure { namespace Storage { namespace Test {
}
listBlobs.insert(blob.Name);
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
EXPECT_TRUE(
std::includes(listBlobs.begin(), listBlobs.end(), p1p2Blobs.begin(), p1p2Blobs.end()));
@ -222,7 +222,7 @@ namespace Azure { namespace Storage { namespace Test {
{
listBlobs.insert(blob.Name);
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
EXPECT_TRUE(std::includes(listBlobs.begin(), listBlobs.end(), p1Blobs.begin(), p1Blobs.end()));
}
@ -356,7 +356,7 @@ namespace Azure { namespace Storage { namespace Test {
foundMetadata = true;
}
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
EXPECT_TRUE(foundSnapshot);
EXPECT_TRUE(foundVersions);
EXPECT_TRUE(foundCurrentVersion);
@ -717,7 +717,7 @@ namespace Azure { namespace Storage { namespace Test {
break;
}
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
}
EXPECT_EQ(deletedContainerItem.Name, containerName);
EXPECT_TRUE(deletedContainerItem.IsDeleted);

View File

@ -122,7 +122,7 @@ namespace Azure { namespace Storage { namespace Test {
{
listContainers.insert(container.Name);
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
EXPECT_TRUE(std::includes(
listContainers.begin(),
listContainers.end(),
@ -153,7 +153,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_FALSE(container.PreventEncryptionScopeOverride);
listContainers.insert(container.Name);
}
} while (!options.ContinuationToken.GetValue().empty());
} while (options.ContinuationToken.HasValue());
EXPECT_TRUE(std::includes(
listContainers.begin(), listContainers.end(), p1Containers.begin(), p1Containers.end()));