mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-29 19:06:22 +02:00
chore: apply clippy fixes to e2e tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e06dd3d69a
commit
ad1e1796f3
13 changed files with 27 additions and 40 deletions
|
|
@ -511,9 +511,9 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_embedding_assertions() {
|
||||
let emb1 = vec![1.0f32, 0.0, 0.0];
|
||||
let emb2 = vec![0.9, 0.1, 0.0];
|
||||
let emb3 = vec![0.0, 1.0, 0.0];
|
||||
let emb1 = [1.0f32, 0.0, 0.0];
|
||||
let emb2 = [0.9, 0.1, 0.0];
|
||||
let emb3 = [0.0, 1.0, 0.0];
|
||||
|
||||
assert_embeddings_similar!(emb1, emb2, 0.8);
|
||||
assert_embeddings_different!(emb1, emb3, 0.5);
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ mod tests {
|
|||
let sim = service.cosine_similarity(&emb1, &emb2);
|
||||
|
||||
// Cosine similarity should be in [-1, 1]
|
||||
assert!(sim >= -1.0 && sim <= 1.0);
|
||||
assert!((-1.0..=1.0).contains(&sim));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue