Skip to content

Commit

Permalink
backend: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSavage committed Nov 22, 2024
1 parent f7b10af commit 7d65ab7
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions go-backend/llms/chunking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ Lorem cubilia cubilia dis iaculis, odio vivamus interdum adipiscing dolor.`
log.Printf(result)
}

if len(results) != 4 {
t.Errorf("wrong number of chunks returned, got %v want %v", len(results), 4)
if len(results) != 2 {
t.Errorf("wrong number of chunks returned, got %v want %v", len(results), 2)
}
string := "Fermentum phasellus hendrerit purus, etiam erat litora."
if len(results) > 4 && results[6] != string {
t.Errorf("wrong chunk return, %v, got %v want %v", results[6] == string, results[6], string)
t.Errorf("one: %v", results[6])
t.Errorf("two: %v", string)
string := `Fermentum phasellus hendrerit purus, etiam erat litora
}
last := "\n\nLorem cubilia cubilia dis iaculis, odio vivamus interdum adipiscing dolor."
if len(results) > 4 && results[7] != last {
t.Errorf("wrong chunk return, got %v want %v", results[7], last)
Lorem cubilia cubilia dis iaculis, odio vivamus interdum adipiscing dolor.`

if len(results) > 1 && results[1] != string {
t.Errorf("wrong chunk return, %v, got %v want %v", results[1] == string, results[1], string)

}
}
Expand Down

0 comments on commit 7d65ab7

Please sign in to comment.