Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

558 B
Raw Blame
package server

import "testing"

func TestConvMessageLimit(t *testing.T) {
	if got := convMessageLimit("", 200, 200); got != 200 {
		t.Fatalf("default: %d", got)
	}
	if got := convMessageLimit("50", 200, 200); got != 50 {
		t.Fatalf("50: %d", got)
	}
	if got := convMessageLimit("2147483646", 200, 200); got != 200 {
		t.Fatalf("huge history: %d", got)
	}
	if got := convMessageLimit("2147483646", 1000, 1000); got != 1000 {
		t.Fatalf("huge since: %d", got)
	}
	if got := convMessageLimit("-1", 200, 200); got != 200 {
		t.Fatalf("negative: %d", got)
	}
}