Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37517

Decompose expressions in ASSERT() to capture argument values

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Service Arch

      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

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: