New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::string_view is stringified without quotes #1375

Closed
melak47 opened this Issue Sep 4, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@melak47
Contributor

melak47 commented Sep 4, 2018

Description

std::string_view probably uses some fallback stringification, and is expanded without quotes (and also bypasses pretty printing of invisibles).

Steps to reproduce

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

#include <string>
#include <string_view>

TEST_CASE("string_view == string") {
    std::string s = "foo";
    std::string_view v = s;

    CHECK(s == v);
}

run with -s:

PASSED:
  CHECK( s == v )
with expansion:
  "foo" == foo

Extra information

Catch version: v2.4.0

melak47 added a commit to melak47/Catch2 that referenced this issue Sep 4, 2018

horenmar added a commit to melak47/Catch2 that referenced this issue Sep 10, 2018

horenmar added a commit to melak47/Catch2 that referenced this issue Sep 10, 2018

@horenmar horenmar closed this in a575536 Sep 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment