mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Fix NIX_COUNT_CALLS=1
Also, make the JSON writer support std::string_view. Fixes #6857.
This commit is contained in:
parent
7d1ccd9105
commit
ccbd906c86
4 changed files with 22 additions and 26 deletions
|
@ -102,8 +102,8 @@ namespace nix {
|
|||
|
||||
TEST(toJSON, substringEscape) {
|
||||
std::stringstream out;
|
||||
const char *s = "foo\t";
|
||||
toJSON(out, s+3, s + strlen(s));
|
||||
std::string_view s = "foo\t";
|
||||
toJSON(out, s.substr(3));
|
||||
|
||||
ASSERT_EQ(out.str(), "\"\\t\"");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue