mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 08:19:35 +01:00
Allow unit test infra to be reused across libs' tests
This allows using Arbitrary "instances" defined in libstore-tests in libexpr-tests, something we will leverage in a moment.
This commit is contained in:
parent
6772e9ed0a
commit
ec0c0efec6
13 changed files with 50 additions and 21 deletions
23
src/libstore/tests/libstore.hh
Normal file
23
src/libstore/tests/libstore.hh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include "store-api.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
class LibStoreTest : public ::testing::Test {
|
||||
public:
|
||||
static void SetUpTestSuite() {
|
||||
initLibStore();
|
||||
}
|
||||
|
||||
protected:
|
||||
LibStoreTest()
|
||||
: store(openStore("dummy://"))
|
||||
{ }
|
||||
|
||||
ref<Store> store;
|
||||
};
|
||||
|
||||
|
||||
} /* namespace nix */
|
||||
Loading…
Add table
Add a link
Reference in a new issue