From ec0c0efec6d7eed868b424434748b97651e02bcc Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 29 Jan 2023 12:37:32 -0500 Subject: 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. --- src/libstore/tests/libstore.hh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/libstore/tests/libstore.hh (limited to 'src/libstore/tests/libstore.hh') diff --git a/src/libstore/tests/libstore.hh b/src/libstore/tests/libstore.hh new file mode 100644 index 000000000..05397659b --- /dev/null +++ b/src/libstore/tests/libstore.hh @@ -0,0 +1,23 @@ +#include +#include + +#include "store-api.hh" + +namespace nix { + +class LibStoreTest : public ::testing::Test { + public: + static void SetUpTestSuite() { + initLibStore(); + } + + protected: + LibStoreTest() + : store(openStore("dummy://")) + { } + + ref store; +}; + + +} /* namespace nix */ -- cgit v1.2.3