catchorg / catchorg/Catch2

String comparison is failing

Open
#1,059 16 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

CHECK(copy == date) will fail with following output:

/.../DateTest.cpp:69: FAILED:
CHECK( copy == date )
with expansion:
"11/02/01" == "11/02/01"

### Steps to reproduce

const char * date = "11/02/01";
char copy[9];

for (auto i = 0; i<9; i++)
copy[i] = date[i];

CHECK(copy == date);

* Catch version: **1.10.0**
* Operating System: **OSX 10.12.6**
* Compiler+version: **XCode 9.0**

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.