18 lines
512 B
Go
18 lines
512 B
Go
package domain_test
|
|
|
|
import (
|
|
selfcontract "git.cin.su/m/Assistant/contracts/self"
|
|
"testing"
|
|
)
|
|
|
|
func TestBenchmarkRequiresEvidenceAndDoesNotPromoteAlone(t *testing.T) {
|
|
e := selfcontract.BenchmarkEvaluation{CaseRef: "case", QualityMillis: 900}
|
|
if e.Valid() {
|
|
t.Fatal("benchmark without evidence accepted")
|
|
}
|
|
e.EvidenceRefs = []selfcontract.SemanticReference{{OwnerNamespace: "epistemics", SemanticKind: "evaluation", StableID: "e"}}
|
|
if !e.Valid() {
|
|
t.Fatal("evidence-backed evaluation rejected")
|
|
}
|
|
}
|