1
0
Fork 0
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:
José Luis Lafuente 2024-02-25 18:14:32 +01:00 committed by José Luis Lafuente
parent 693e8ec8fe
commit 2e1dbbe307
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
6 changed files with 55 additions and 74 deletions

View file

@ -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;
};
}