Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public abstract class BasicObjectTests<T> : SerializationTest<T> where T : ISeri
[MemberData(nameof(SerializableObjects))]
public void DeserializeStoredObjects(object value, TypeSerializableValue[] serializedData)
{
_ = value;
// Following call may change the contents of the fields by invoking lazy-evaluated properties.
EqualityExtensions.CheckEquals(value, value);

int platformIndex = serializedData.GetPlatformIndex();
for (int i = 0; i < serializedData.Length; i++)
Expand Down Expand Up @@ -48,6 +49,9 @@ public void BasicObjectsRoundtrip(
FormatterAssemblyStyle assemblyMatching,
FormatterTypeStyle typeStyle)
{
// Following call may change the contents of the fields by invoking lazy-evaluated properties.
EqualityExtensions.CheckEquals(value, value);

object deserialized = RoundTrip(value, typeStyle: typeStyle, assemblyMatching: assemblyMatching);

// string.Empty and DBNull are both singletons
Expand Down
Loading