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

Add operator== for SBE tag val pair for ASSERT_EQ

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Integration
    • QI 2023-07-24

    Description

      ASSERT_EQ macro function has the capability to print out additional message when assertion fails like...

      ASSERT_EQ(...) << "message";
      

      The current implementation of assertValuesEqual makes it hard to print out additional information and in result, it's a bit hard to debug using log messages and it would take longer time to debug.

      It would be beneficial to have assertValuesEqual's failure log print out additional info to help unittest debugging more quickly. For example, we could do

      ASSERT_SBE_VALUES_EQUAL(...) << "message";
      

      And also ASSERT_SBE_VALUES_LT, ASSERT_SBE_VALUES_GT and etc.

      It would be great to modify existing test cases using the new functionality so that we can make good examples of unittests.

      Attachments

        Activity

          People

            yoonsoo.kim@mongodb.com Yoon Soo Kim
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: