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

C API: add tests for libutil and libstore

This commit is contained in:
José Luis Lafuente 2023-12-14 20:14:58 +01:00 committed by José Luis Lafuente
parent 46f5d0ee7b
commit 41f1669dea
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
6 changed files with 133 additions and 25 deletions

View file

@ -0,0 +1,25 @@
#pragma once
///@file
#include "nix_api_util.h"
#include <gtest/gtest.h>
class nix_api_util_context : public ::testing::Test
{
protected:
static void SetUpTestSuite()
{
nix_libutil_init(NULL);
}
void SetUp() override
{
ctx = nix_c_context_create();
};
void TearDown() override
{
nix_c_context_free(ctx);
ctx = nullptr;
}
nix_c_context * ctx;
};