Skip to content

Commit

Permalink
tests: make bad GGUF value size test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGaessler committed Dec 18, 2024
1 parent 6b064c9 commit dfb40c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-gguf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static FILE * get_handcrafted_file(const unsigned int seed, const enum handcraft

size_t type_size = hft == HANDCRAFTED_KV_BAD_TYPE ? 1 : gguf_type_size(type);
if (hft == HANDCRAFTED_KV_BAD_VALUE_SIZE) {
type_size += rng() % 3;
type_size ^= 1;
}
helper_write(data, type_size, file);
}
Expand Down

0 comments on commit dfb40c6

Please sign in to comment.