Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130477

QCOMPARE's debug output unhelpful on long strings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8
    • Testing: qtestlib
    • None

    Description

      QCOMPARE prints out a somewhat unhelpful message when long strings mismatches:

      agent:2024/10/17 15:51:32 build.go:404: 313: FAIL!  : tst_qmlls_modules::rangeFormatting(selectRegion2) Compared values are not the same
      agent:2024/10/17 15:51:32 build.go:404: 313:    Actual   (text.newText)  : "pragma Strict\r\n\r\nimport QtQuick\r\n\r\nItem {\r\n    property var test: [{\r\n// Testing\r\n            \"foo\": \"bar\"\r\n}]\r\n\r\n    Item {\r\n\r\n        function test() {\r\n            var patron = \"\xF0\x9F\x90\x88test\xF0\x9F\x90\x88"...
      agent:2024/10/17 15:51:32 build.go:404: 313:    Expected (file.readAll()): "pragma Strict\r\n\r\nimport QtQuick\r\n\r\nItem {\r\n    property var test: [{\r\n// Testing\r\n            \"foo\": \"bar\"\r\n}]\r\n\r\n    Item {\r\n\r\n        function test() {\r\n            var patron = \"\xF0\x9F\x90\x88test\xF0\x9F\x90\x88"...
      

      I wish it would print at least until the first mismatching character (+ eventually some extra characters for context, around 10 - 15?), so that I can tell what the CI complains about without having to get a debugging VM

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              macadder Jason McDonald
              sami.shalayel Sami Shalayel
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes