Use FixedStrings when verifying FixedString contents' correctness

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • Programmability 2025-08-04
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Our unittesting framework carves out an overload in the assertion comparison infrastructure that coerces types convertible to StringData to implicitly convert to StringData. This allows the fixed_string_test.cpp test to compare FixedString directly to string literals, which are convertible to StringData, even as FixedString doesn't directly support comparisons with string literals.

      Gtest doesn't offer special treatment to string-like types. To ease the port to gtest, modify the FixedString tests to use exclusively FixedStrings in comparisons. Eventually, we may add support for comparing {{FixedString}}s directly to string literals in SERVER-108310; this ticket allows us to get on gtest without having to resolve that question.

            Assignee:
            James Bronsted
            Reporter:
            James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: