Skip to content
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
Closed

std::string_view is stringified without quotes #1375

melak47 opened this issue Sep 4, 2018 · 0 comments

Comments

@melak47
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant