Skip to content

Drop pre-conversion of test case/fixture params where .NET supports it implicitly #3761

@stevenaw

Description

@stevenaw

NUnit has historically handled and pre-converted some type conversions when passing parameters to test cases/fixtures. These include both native-supported implicit conversions of primitives as per the ECMA spec (ex: int -> long or short -> int) and some special case conversions for ease-of-use (like string -> DateTime). Preconversion of primitives within NUnit of types also implicitly converted by netfx + netcore has also meant some bugs and added complexity:

I think it should be considered to drop this preconversion of NUnit-provided ECMA-defined implicit conversions. This would not include removing ease-of-use custom conversions like string -> DateTime which should make it a relatively transparent change to consumers. One point of discussion is that this preconversion was originally added for Compact Framework, and that removing it could disrupt any CF consumers (if that is still supported)

I'd like to hear some thoughts on this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions