![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include "nix/util/error.hh"#include "nix/util/system-error.hh"#include "nix/util/source-accessor.hh"#include "nix/util/terminal.hh"#include <gmock/gmock.h>Go to the source code of this file.
Classes | |
| class | nix::testing::internal::HasSubstrIgnoreANSIMatcher |
Functions | |
| inline ::testing::PolymorphicMatcher< internal::HasSubstrIgnoreANSIMatcher > | nix::testing::HasSubstrIgnoreANSIMatcher (const std::string &substring) |
| auto | nix::testing::ThrowsSysError (int expected) |
| auto | nix::testing::ThrowsSystemError (std::errc expected) |
| nix::testing::MATCHER_P2 (HasContents, path, expected, "") | |
| nix::testing::MATCHER_P2 (HasSymlink, path, target, "") | |
| nix::testing::MATCHER_P2 (HasDirectory, path, dirents, "") | |
|
inline |
Matches a callable that throws SysError whose errNo equals expected.
Example:
EXPECT_THAT([&]{ openFile("nope"); }, ThrowsSysError(ENOENT));
|
inline |
Matches a callable that throws SystemError whose error code is equivalent to expected.
Example:
EXPECT_THAT([&]{ openFile("nope"); }, ThrowsSystemError(std::errc::no_such_file_or_directory));