mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
C API: refactor test support
This commit is contained in:
parent
693e8ec8fe
commit
2e1dbbe307
6 changed files with 55 additions and 74 deletions
|
@ -4,17 +4,15 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nixC {
|
||||
class nix_api_util_context : public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
static void SetUpTestSuite()
|
||||
{
|
||||
nix_libutil_init(NULL);
|
||||
}
|
||||
|
||||
nix_api_util_context()
|
||||
{
|
||||
ctx = nix_c_context_create();
|
||||
nix_libutil_init(ctx);
|
||||
};
|
||||
|
||||
~nix_api_util_context() override
|
||||
|
@ -25,3 +23,4 @@ protected:
|
|||
|
||||
nix_c_context * ctx;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue