diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-29 12:37:32 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-29 13:52:57 -0500 |
commit | ec0c0efec6d7eed868b424434748b97651e02bcc (patch) | |
tree | 29ced9d126d9db8eced4e0ab380a990dbda51885 /src/libstore/tests/libstore.hh | |
parent | 6772e9ed0ac7853cefdeb6b354c81cba531829f2 (diff) |
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.
Diffstat (limited to 'src/libstore/tests/libstore.hh')
-rw-r--r-- | src/libstore/tests/libstore.hh | 23 |
1 files changed, 23 insertions, 0 deletions
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 <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 */ |