[SERVER-37517] Decompose expressions in ASSERT() to capture argument values Created: 08/Oct/18  Updated: 06/Dec/22  Resolved: 24/Feb/22

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mira Carey Assignee: Backlog - Service Architecture
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-34304 matchers for use in assertion conditions Backlog
Assigned Teams:
Service Arch
Participants:

 Description   

Extending our ASSERT method to capture expressions with expression templates (a la catch2) would allow for much more readable assertions that didn't damage later debuggability.

Consider directly using catch2 as one viable option

This would allow:

ASSERT_EQUALS(foo, bar);

to be rewritten as:

ASSERT(foo == bar);

without losing the values of foo and bar if the assertion fires



 Comments   
Comment by Blake Oler [ 27/Oct/22 ]

Keeping this closed, we think this problem is solved by the ASSERT_THAT library.

Comment by Lauren Lewis (Inactive) [ 24/Feb/22 ]

We haven’t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket.

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