mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +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) {
|
||||
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)) {
|
||||
|
@ -106,8 +106,8 @@ namespace nix {
|
|||
if (arg.type() != nPath) {
|
||||
*result_listener << "Expected a path got " << arg.type();
|
||||
return false;
|
||||
} else if (std::string_view(arg.string.s) != p) {
|
||||
*result_listener << "Expected a path that equals \"" << p << "\" but got: " << arg.string.s;
|
||||
} else if (std::string_view(arg._path) != p) {
|
||||
*result_listener << "Expected a path that equals \"" << p << "\" but got: " << arg.c_str();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue