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

Make auto-updating assertions work on single-line assertions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Right now, auto-updating assertions need to be spread across multiple lines to work properly. New assertions are generally written in this format to avoid being collapsed by clang-format to a single line:

      ASSERT_STR_EQ_AUTO( // NOLINT
          "",
          actualOutput);
      

      This is cumbersome to write and leads to very strange behavior if not done properly. To be more user-friendly, auto-updating assertions should be able to be written like so:

      ASSERT_STR_EQ_AUTO("", actualOutput);
      

      and the expected output should be filled in as expected.

      Attachments

        Activity

          People

            davis.haupt@mongodb.com Davis Haupt (Inactive)
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: