1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

C API: add more tests

This commit is contained in:
José Luis Lafuente 2024-03-29 14:00:19 +01:00
parent 2d84433a3b
commit 926fbadcc3
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
5 changed files with 112 additions and 72 deletions

View file

@ -227,7 +227,7 @@ double nix_get_float(nix_c_context * context, const Value * value)
assert(v.type() == nix::nFloat);
return v.fpoint;
}
NIXC_CATCH_ERRS_RES(NAN);
NIXC_CATCH_ERRS_RES(0.0);
}
int64_t nix_get_int(nix_c_context * context, const Value * value)