Skip to content

Commit 88472f9

Browse files
committed
correct check using assertionVal instead of actual
1 parent 8b3929d commit 88472f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/integration/unified/matches.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func evaluateSpecialComparison(ctx context.Context, assertionDoc bson.Raw, actua
245245
if assertionVal.Type != bson.TypeInt32 && assertionVal.Type != bson.TypeInt64 && assertionVal.Type != bson.TypeDouble {
246246
return fmt.Errorf("expected assertionVal to be an Int32, Int64, or Double but got a %s", assertionVal.Type)
247247
}
248-
if actual.Type != bson.TypeInt32 && actual.Type != bson.TypeInt64 && assertionVal.Type != bson.TypeDouble {
248+
if actual.Type != bson.TypeInt32 && actual.Type != bson.TypeInt64 && actual.Type != bson.TypeDouble {
249249
return fmt.Errorf("expected value to be an Int32, Int64, or Double but got a %s", actual.Type)
250250
}
251251

0 commit comments

Comments
 (0)