diff options
| author | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-03 15:22:15 +0200 |
|---|---|---|
| committer | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-03 15:45:29 +0200 |
| commit | a61bc9ff890ea50d41a406cd1ffe554341551d2b (patch) | |
| tree | 3159fa6cb444d88fae7ac7abee92420d551831c7 /llm/run_test.go | |
| parent | dc0c59b97243645a9fdc040460e51d290085374e (diff) | |
Use token buffer to generate jobs
Diffstat (limited to 'llm/run_test.go')
| -rw-r--r-- | llm/run_test.go | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/llm/run_test.go b/llm/run_test.go deleted file mode 100644 index fa974a7..0000000 --- a/llm/run_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) - } - }, - ) - } -} |
