(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestSimpleEngine_Estimate(t *testing.T) { |
| 10 | e := NewSimpleEngine() |
| 11 | out := e.Estimate( |
| 12 | types.AIRequest{Options: types.RequestOptions{MaxTokens: 1000}}, |
| 13 | types.BackendMetadata{CostUnit: 2.0}, |
| 14 | ) |
| 15 | if out.UnitCost != 2.0 { |
| 16 | t.Fatalf("UnitCost=%v", out.UnitCost) |
| 17 | } |
| 18 | if out.EstimatedTotal <= out.UnitCost { |
| 19 | t.Fatalf("EstimatedTotal=%v", out.EstimatedTotal) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | func TestSimpleEngine_Estimate_DefaultMaxTokens(t *testing.T) { |
| 24 | e := NewSimpleEngine() |
nothing calls this directly
no test coverage detected