mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
C API: source argument to nix_copy_value should be const
This commit is contained in:
parent
8d70db3251
commit
6acf02b32a
3 changed files with 15 additions and 2 deletions
|
@ -367,4 +367,17 @@ TEST_F(nix_api_expr_test, nix_value_init_apply_lazy_arg)
|
|||
nix_gc_decref(ctx, e);
|
||||
}
|
||||
|
||||
TEST_F(nix_api_expr_test, nix_copy_value)
|
||||
{
|
||||
Value * source = nix_alloc_value(ctx, state);
|
||||
|
||||
nix_init_int(ctx, source, 42);
|
||||
nix_copy_value(ctx, value, source);
|
||||
|
||||
ASSERT_EQ(42, nix_get_int(ctx, value));
|
||||
|
||||
// Clean up
|
||||
nix_gc_decref(ctx, source);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue