mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 12:41:00 +01:00
Add DummyStore::operator==
Will need it for tests.
This commit is contained in:
parent
b0c016ae7d
commit
622a5cd1bf
2 changed files with 14 additions and 0 deletions
|
|
@ -16,6 +16,16 @@ std::string DummyStoreConfig::doc()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DummyStore::PathInfoAndContents::operator==(const PathInfoAndContents & other) const
|
||||||
|
{
|
||||||
|
return info == other.info && contents->root == other.contents->root;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DummyStore::operator==(const DummyStore & other) const
|
||||||
|
{
|
||||||
|
return contents == other.contents && derivations == other.derivations && buildTrace == other.buildTrace;
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class WholeStoreViewAccessor : public SourceAccessor
|
class WholeStoreViewAccessor : public SourceAccessor
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ struct DummyStore : virtual Store
|
||||||
{
|
{
|
||||||
UnkeyedValidPathInfo info;
|
UnkeyedValidPathInfo info;
|
||||||
ref<MemorySourceAccessor> contents;
|
ref<MemorySourceAccessor> contents;
|
||||||
|
|
||||||
|
bool operator==(const PathInfoAndContents &) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,6 +56,8 @@ struct DummyStore : virtual Store
|
||||||
, config(config)
|
, config(config)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(const DummyStore &) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace nix
|
} // namespace nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue