mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-05-07 01:56:40 +02:00
15 lines
411 B
Go
15 lines
411 B
Go
package knowledge
|
|
|
|
import "testing"
|
|
|
|
func TestFormatQueryEmbeddingText_AlignsWithIndexPrefix(t *testing.T) {
|
|
q := FormatQueryEmbeddingText("XSS", "payload")
|
|
want := FormatEmbeddingInput("XSS", "", "payload")
|
|
if q != want {
|
|
t.Fatalf("query embed text mismatch:\n got: %q\nwant: %q", q, want)
|
|
}
|
|
if FormatQueryEmbeddingText("", "hello") != "hello" {
|
|
t.Fatalf("expected bare query without risk type")
|
|
}
|
|
}
|