summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyaskalyan@gmail.com>2018-10-15 14:05:07 -0400
committerShreyas Kalyan <shreyaskalyan@gmail.com>2018-10-15 18:25:44 -0400
commit03c7e9e4688583394b3ac10e306546e8413bb52c (patch)
tree1e0985e1167c46c2b9eae0f65edb05cb84091a49
parent9693ebbdb9a0098dbcd894a739218ae30238c72d (diff)
downloadmongo-03c7e9e4688583394b3ac10e306546e8413bb52c.tar.gz
SERVER-37628 Fix unittests on windows from mongo_uri_test
-rw-r--r--src/mongo/client/mongo_uri_test.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/client/mongo_uri_test.cpp b/src/mongo/client/mongo_uri_test.cpp
index 6e97d94e924..c782a481c07 100644
--- a/src/mongo/client/mongo_uri_test.cpp
+++ b/src/mongo/client/mongo_uri_test.cpp
@@ -57,7 +57,11 @@ struct URITestCase {
struct InvalidURITestCase {
std::string URI;
- boost::optional<Status> status = boost::none;
+ boost::optional<Status> status;
+ InvalidURITestCase(std::string aURI, boost::optional<Status> aStatus = boost::none) {
+ URI = std::move(aURI);
+ status = std::move(aStatus);
+ }
};
const ConnectionString::ConnectionType kMaster = ConnectionString::MASTER;
@@ -552,7 +556,7 @@ TEST(MongoURI, specTests) {
if (!valid) {
// This uri string is invalid --> parse the uri and ensure it fails
- const InvalidURITestCase testCase = {uri};
+ const InvalidURITestCase testCase = InvalidURITestCase{uri};
unittest::log() << "Testing URI: " << testCase.URI << '\n';
auto cs_status = MongoURI::parse(testCase.URI);
ASSERT_NOT_OK(cs_status);