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

Enable formatted error messages in unittest assertions

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch

      Right now, we can append std::string messages to unittest assertions via

      ASSERT(...) << "Message to print on failure"
      

      actual code example

      However, unlike our logging system, there isn't support for printing complex types like

      std::vector<class with toString() method or BSON()>
      

      Leveraging the formatting built into our logging system could enable developers to write unittests with more meaningful debug information upon failure. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: