1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 11:03:54 +02:00

C API: add nix_api_expr tests

This commit is contained in:
José Luis Lafuente 2024-01-03 19:10:43 +01:00 committed by José Luis Lafuente
parent 55601963b3
commit ac3a9c6605
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
5 changed files with 139 additions and 24 deletions

View file

@ -4,7 +4,6 @@
#include <gtest/gtest.h>
class nix_api_util_context : public ::testing::Test
{
protected:
@ -12,14 +11,17 @@ protected:
{
nix_libutil_init(NULL);
}
void SetUp() override
nix_api_util_context()
{
ctx = nix_c_context_create();
};
void TearDown() override
~nix_api_util_context() override
{
nix_c_context_free(ctx);
ctx = nullptr;
}
nix_c_context * ctx;
};