Skip to content

Commit 49f0b4f

Browse files
committed
Address Copilot nitpick feedback
1. Remove misleading 'null-safety' mention from CHANGELOG - The improvement was about matching equality semantics, not null-safety - Both old and new implementations use HashCode.Combine which handles nulls 2. Fix misleading comment in byte[] edge case test - Comment said Width values are different, but they're actually the same - Clarified that Width is same (1000) despite different Size values - This is exactly what the test is verifying
1 parent 31d5ac0 commit 49f0b4f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- **Other types** (bool, int, long, DateTime, TimeSpan, Guid, etc.): Compares only `CSharpType`
1818
- Fixes round-trip equality when comparing guesser-created and SQL reverse-engineered types
1919
- Compares backing field `_maxWidthForStrings` instead of computed `Width` property to avoid Size interference
20-
- `GetHashCode()` updated to match new equality semantics for consistency and null-safety
20+
- `GetHashCode()` updated to match new equality semantics for consistency
2121
- Added 19 comprehensive tests covering all type-specific equality cases and edge cases
2222

2323
## [2.0.1] - 2025-11-15

Tests/DatabaseTypeRequestEnhancedTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ public void Equals_ByteArray_WithSameWidthButDifferentSize_AreEqual()
631631
var request1 = new DatabaseTypeRequest(typeof(byte[]), 1000, new DecimalSize(20, 0));
632632
var request2 = new DatabaseTypeRequest(typeof(byte[]), 1000, new DecimalSize(0, 0));
633633

634-
// Verify the Width property values are different due to Size
634+
// Verify the Width property values are the same (1000) despite different Size values,
635+
// because Width returns Math.Max(_maxWidthForStrings, Size.ToStringLength())
635636
Assert.That(request1.Width, Is.EqualTo(1000), "Width should be max of explicit and Size");
636637
Assert.That(request2.Width, Is.EqualTo(1000), "Width should be just the explicit value");
637638

0 commit comments

Comments
 (0)