Consolidate D&D prompt ordering tests

This commit is contained in:
2026-07-27 20:14:57 +00:00
parent c0ec068f53
commit d1eaec4dad
9 changed files with 218 additions and 312 deletions

View File

@@ -54,12 +54,12 @@ func TestRegisterPromptAssetsPreparesNormalizationPrompt(t *testing.T) {
t.Errorf("message %d role = %q, want %q", index, prepared.Messages[index].Role, role)
}
}
for _, index := range []int{0, 2} {
for _, index := range []int{2, 4} {
if cache := prepared.Messages[index].CacheControl; cache == nil || cache.Type != scriptorium.CacheControlEphemeral {
t.Errorf("message %d cache control = %#v, want ephemeral", index, cache)
}
}
for _, index := range []int{1, 3, 4} {
for _, index := range []int{0, 1, 3} {
if cache := prepared.Messages[index].CacheControl; cache != nil {
t.Errorf("message %d cache control = %#v, want nil", index, cache)
}