Skip to content

Broken char comparison in v3.7 and higher #2757

@dgg

Description

@dgg

Hi,

I just found out that there is a problem comparing chars that happened from 3.7.

Take this assertion:

Assert.That('2', Is.GreaterThan('3'));

When run in 3.6.1, the assertion will (correctly) fail:

Test 'whatever' failed:   Expected: greater than '3'
  But was:  '2'

When the same assertion is run in 3.7.0 or higher, it will not fail, which, in my opinion, is wrong as '2' is definitely not greater than '3' and neither are their numeric values (50 and 51).

Metadata

Metadata

Assignees

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