Refactor concurrently added tests to use HashAlgorithm.

https://github.com/NixOS/nix/issues/8876
This commit is contained in:
Peter Kolloch 2023-12-02 16:43:52 +01:00
parent d38ec12855
commit bbba2055f0

View file

@ -11,7 +11,7 @@ using namespace nix;
Gen<Hash> Arbitrary<Hash>::arbitrary() Gen<Hash> Arbitrary<Hash>::arbitrary()
{ {
Hash hash(htSHA1); Hash hash(HashAlgorithm::SHA1);
for (size_t i = 0; i < hash.hashSize; ++i) for (size_t i = 0; i < hash.hashSize; ++i)
hash.hash[i] = *gen::arbitrary<uint8_t>(); hash.hash[i] = *gen::arbitrary<uint8_t>();
return gen::just(hash); return gen::just(hash);