From 97c346329151916727a3dd154e4d088b2e16fd2d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 23 May 2024 19:56:32 +0200 Subject: [PATCH] C API: Refactor: use NIX_VALUE_CALL --- tests/unit/libexpr/nix_api_expr.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/unit/libexpr/nix_api_expr.cc b/tests/unit/libexpr/nix_api_expr.cc index fd7d043c0..92a6a1175 100644 --- a/tests/unit/libexpr/nix_api_expr.cc +++ b/tests/unit/libexpr/nix_api_expr.cc @@ -373,14 +373,9 @@ TEST_F(nix_api_expr_test, nix_expr_primop_bad_return_thunk) nix_init_int(ctx, four, 4); assert_ctx_ok(); - Value * partial = nix_alloc_value(ctx, state); - assert_ctx_ok(); - nix_value_call(ctx, state, primopValue, toString, partial); - assert_ctx_ok(); - Value * result = nix_alloc_value(ctx, state); assert_ctx_ok(); - nix_value_call(ctx, state, partial, four, result); + NIX_VALUE_CALL(ctx, state, result, primopValue, toString, four); ASSERT_EQ(ctx->last_err_code, NIX_ERR_NIX_ERROR); ASSERT_THAT(