Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
nix_api_expr.hh
Go to the documentation of this file.
1
#pragma once
3
#include "nix_api_expr.h"
4
#include "nix_api_value.h"
5
#include "
nix/store/tests/nix_api_store.hh
"
6
7
#include <gtest/gtest.h>
8
9
namespace
nixC {
10
11
class
nix_api_expr_test
:
public
nix_api_store_test
12
{
13
protected
:
14
15
void
SetUp()
override
16
{
17
nix_api_store_test::SetUp();
18
/* A skip in the base returns from the base only, leaving `store` null. */
19
if
(IsSkipped())
20
return
;
21
nix_libexpr_init(ctx);
22
state = nix_state_create(
nullptr
,
nullptr
, store);
23
value = nix_alloc_value(
nullptr
, state);
24
}
25
26
void
TearDown()
override
27
{
28
/* Also runs for skipped tests, where these are null. */
29
if
(value)
30
nix_gc_decref(
nullptr
, value);
31
if
(state)
32
nix_state_free(state);
33
}
34
35
EvalState * state =
nullptr
;
36
nix_value * value =
nullptr
;
37
};
38
39
}
// namespace nixC
nixC::nix_api_expr_test
Definition
nix_api_expr.hh:12
nix_api_store.hh
libexpr-test-support
include
nix
expr
tests
nix_api_expr.hh
Generated by
1.18.0