(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestSystemMessageAt_UsesProvidedClock(t *testing.T) { |
| 76 | t.Parallel() |
| 77 | fixed := time.Date(2024, 6, 15, 12, 0, 0, 0, time.UTC) |
| 78 | |
| 79 | msg := SystemMessageAt(fixed, "you are a helpful assistant") |
| 80 | |
| 81 | if msg.Message.Role != chat.MessageRoleSystem { |
| 82 | t.Errorf("Role = %v, want system", msg.Message.Role) |
| 83 | } |
| 84 | if msg.Message.CreatedAt != fixed.Format(time.RFC3339) { |
| 85 | t.Errorf("CreatedAt = %q, want %q", msg.Message.CreatedAt, fixed.Format(time.RFC3339)) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func TestImplicitUserMessageAt_IsImplicitAndUsesClock(t *testing.T) { |
| 90 | t.Parallel() |
nothing calls this directly
no test coverage detected