1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

C API: refactor ListBuilder

This commit is contained in:
José Luis Lafuente 2024-02-27 22:08:00 +01:00 committed by José Luis Lafuente
parent 34d15e8f2f
commit 1a574c6c60
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
4 changed files with 50 additions and 37 deletions

View file

@ -78,7 +78,7 @@ TEST_F(nix_api_expr_test, nix_build_and_init_list)
Value * intValue = nix_alloc_value(nullptr, state);
nix_init_int(nullptr, intValue, 42);
nix_list_builder_insert(nullptr, builder, intValue);
nix_make_list(nullptr, state, value, builder);
nix_make_list(nullptr, state, builder, value);
nix_list_builder_free(builder);
ASSERT_EQ(42, nix_get_int(nullptr, nix_get_list_byidx(nullptr, value, state, 0)));