extend ASSERT macros to stringify literally anything

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2022-10-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      To use enum class when asserting in unit tests using ASSERT_EQ (or anything built on ASSERT_COMPARE) you also need to define an operator<< for your enum class type.

      It would be nice if the assertion macros had a fallback for enum class that explicitly casts to the underlying type so the user does not have to add operator<< (or explicitly casting in unit tests)

      Another workaround exists which is to useĀ ASSERT_THAT(..., Eq(...)); which is also clunky.

            Assignee:
            Billy Donahue
            Reporter:
            Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: