mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
fix(tests): fix assumption that string.s is a char*
This commit is contained in:
parent
9a78d87bc0
commit
7e24dc606b
1 changed files with 3 additions and 3 deletions
|
@ -71,7 +71,7 @@ namespace nix {
|
||||||
if (arg.type() != nString) {
|
if (arg.type() != nString) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return std::string_view(arg.string.s) == s;
|
return std::string_view(arg.c_str()) == s;
|
||||||
}
|
}
|
||||||
|
|
||||||
MATCHER_P(IsIntEq, v, fmt("The string is equal to \"%1%\"", v)) {
|
MATCHER_P(IsIntEq, v, fmt("The string is equal to \"%1%\"", v)) {
|
||||||
|
@ -106,8 +106,8 @@ namespace nix {
|
||||||
if (arg.type() != nPath) {
|
if (arg.type() != nPath) {
|
||||||
*result_listener << "Expected a path got " << arg.type();
|
*result_listener << "Expected a path got " << arg.type();
|
||||||
return false;
|
return false;
|
||||||
} else if (std::string_view(arg.string.s) != p) {
|
} else if (std::string_view(arg._path) != p) {
|
||||||
*result_listener << "Expected a path that equals \"" << p << "\" but got: " << arg.string.s;
|
*result_listener << "Expected a path that equals \"" << p << "\" but got: " << arg.c_str();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue