Skip to content

SerializationException in low trust floating point equality test #2526

@ggeurts

Description

@ggeurts

The following test throws when run in low trust appdomain:

var quantity = Quantity.Create(10.5, "mg/l");
Assert.That(quantity, Is.Not.Null);
Assert.That(quantity.UnitSymbol, Is.EqualTo("mg/l"));
Assert.That(quantity.Magnitude, Is.EqualTo(10.5)); // throws SerializationException

System.Runtime.Serialization.SerializationException : Type 'NUnit.Framework.Constraints.Tolerance' in Assembly 'nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' is not marked as serializable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions