[SERVER-33628] modernize mongo/unittest Created: 02/Mar/18  Updated: 29/Oct/23  Resolved: 05/Mar/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Improvement Priority: Trivial - P5
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 2018-03-12
Participants:

 Description   

There are some pre-11 holdovers in the unittest library that I can easily clean out. It's code that needs to be reviewed while debugging unexpected results in tests, so I think making it clearer will have some gains in bug investigations.



 Comments   
Comment by Githook User [ 05/Mar/18 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}

Message: SERVER-33628 Handle a mongo/unittest TODO c++11

Use unique_ptr instead of shared_ptr.
Simplify with range-based for loops and auto where appropriate.
Change ASSERT_EQ guts to rely less on macros.
Change the reserved _[A-Z] names (use trailing underscore instead).
Change a vector<T*> to vector<unique_ptr<T>>.
Change shared_ptr<T*> to unique_ptr<T>.
Add a comment to mongoutils::str::stream lamenting missing relops.
Add static to comparator() members.
Add static constexpr to name() members.
Branch: master
https://github.com/mongodb/mongo/commit/353c918ab688cda839bf2efb60f8cab9d078f3da

Comment by Billy Donahue [ 02/Mar/18 ]

Code Review:
https://mongodbcr.appspot.com/189500001/

Generated at Thu Feb 08 04:34:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.