diff options
| author | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-03-25 21:50:15 +0100 |
|---|---|---|
| committer | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-03-25 21:50:15 +0100 |
| commit | a52a3cd0e6d6d999e93877150adf4c4ec19deff0 (patch) | |
| tree | f10b6b1a35cb504d6b467b9e8adc87376282bbfd /llm/perplexity_test.go | |
| parent | 0c6a2cadf261945558c75256d32fadf569b4a48d (diff) | |
Refactor llm module
Diffstat (limited to 'llm/perplexity_test.go')
| -rw-r--r-- | llm/perplexity_test.go | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/llm/perplexity_test.go b/llm/perplexity_test.go deleted file mode 100644 index fa974a7..0000000 --- a/llm/perplexity_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package llm - -import ( - "fmt" - "testing" -) - -func TestEvaluator_estimateJobs(t *testing.T) { - type gold struct { - tokens int - window int - stride int - expected int - } - - tests := []gold{ - {tokens: 20, window: 10, stride: 3, expected: 4}, - {tokens: 20, window: 10, stride: 4, expected: 3}, - {tokens: 20, window: 10, stride: 5, expected: 3}, - - {tokens: 0, window: 1, stride: 1, expected: 0}, - {tokens: 1, window: 1, stride: 1, expected: 1}, - - {tokens: 0, window: 1024, stride: 1, expected: 0}, - {tokens: 1, window: 1, stride: 1024, expected: 1}, - } - - e := NewEvaluator[any](nil, nil, nil) - - for _, tt := range tests { - t.Run( - fmt.Sprintf("tokens%d_window%d_stride%d", tt.tokens, tt.window, tt.stride), - - func(t *testing.T) { - tokens := make([]int64, tt.tokens) - - got := e.estimateJobs(tokens, tt.window, tt.stride) - - if got != tt.expected { - t.Errorf("expected %d but got (%d, %d, %d) = %d", tt.expected, tt.tokens, tt.window, tt.stride, got) - } - }, - ) - } -} |
