catchorg / catchorg/Catch2

Printing array in matcher

Open
#2,002 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Description**
I have a matcher to check the contents of a byte array.
In the matcher's "describe" method, the output is preceded by the value under test.
In case of an array, this points to the memory address which off course I'm not interested in.
It would be better to also be able to print the value under test.

**Additional context**
currently this is the kind of output I get:
```
src/test_FC01.cpp:46: PASSED:
REQUIRE_THAT(request.data(), EqualsByteArray(validMessage, 8))
with expansion:
0x000055b38ada8300 equals 0x1101001300250E84
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.