[CQF] Make ASSERT_EXPLAIN macros easier to update

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, updating a test that uses ASSERT_EXPLAIN requires several steps. For example what I do is:

      1. Find the definition of kDebugAsserts and change it to 'true' temporarily.
      2. Run the unit test.
      3. Find either `V2` or `V2Compact` in the output; copy it.
      4. Paste it into the .cpp
      5. Use editor shortcuts to fix the quoting and indentation.

      There are some easy ways to improve this:

      • Remove the kDebugAsserts flag. Instead, have the macro print whenever the comparison fails. (And not when it succeeds.)
      • Have the macro print using only one explain format (the one relevant to that assertion).
      • Have the printed output be already string-quoted and ready to copy-paste into the .cpp.

      Then the steps would be:

      1. Run the unit test.
      2. Find the only expected-output message; copy it.
      3. Paste it into the .cpp

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            David Percy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: