Add DummyStore::operator==
Will need it for tests.
This commit is contained in:
@@ -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 {
|
||||
|
||||
class WholeStoreViewAccessor : public SourceAccessor
|
||||
|
||||
@@ -23,6 +23,8 @@ struct DummyStore : virtual Store
|
||||
{
|
||||
UnkeyedValidPathInfo info;
|
||||
ref<MemorySourceAccessor> contents;
|
||||
|
||||
bool operator==(const PathInfoAndContents &) const;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -54,6 +56,8 @@ struct DummyStore : virtual Store
|
||||
, config(config)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==(const DummyStore &) const;
|
||||
};
|
||||
|
||||
} // namespace nix
|
||||
|
||||
Reference in New Issue
Block a user