Align validator identity and span domain checks
This commit is contained in:
@@ -48,6 +48,13 @@ func TestCorrectionProposalValidate_AllowsEmptyCorrectedText(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCorrectionProposalValidate_AllowsWhitespaceOriginalText(t *testing.T) {
|
||||
proposal := CorrectionProposal{TargetSegmentID: 42, OriginalText: " ", CorrectedText: " ", Confidence: 0.95}
|
||||
if err := proposal.Validate(); err != nil {
|
||||
t.Fatalf("expected whitespace span to be valid, got %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCorrectionProposalValidate_InvalidConfidence(t *testing.T) {
|
||||
proposal := CorrectionProposal{
|
||||
TargetSegmentID: 42,
|
||||
|
||||
Reference in New Issue
Block a user