(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestContextInjector_InjectDateTime(t *testing.T) { |
| 11 | config := InjectorConfig{ |
| 12 | EnableDateTime: true, |
| 13 | } |
| 14 | |
| 15 | injector := NewContextInjector(config) |
| 16 | systemPrompt := "You are a helpful assistant." |
| 17 | |
| 18 | result := injector.InjectContext(context.Background(), systemPrompt) |
| 19 | |
| 20 | if !strings.Contains(result, "Current Date and Time") { |
| 21 | t.Error("expected date time context to be injected") |
| 22 | } |
| 23 | |
| 24 | if !strings.Contains(result, "Date:") { |
| 25 | t.Error("expected date to be included") |
| 26 | } |
| 27 | |
| 28 | if !strings.Contains(result, "Time:") { |
| 29 | t.Error("expected time to be included") |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestContextInjector_InjectLocation(t *testing.T) { |
| 34 | location := &LocationInfo{ |
nothing calls this directly
no test coverage detected