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

Decompose expressions in ASSERT() to capture argument values

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing Infrastructure
    • None
    • Service Arch

    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

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: