beberlei / assert

Thin assertion library for use in libraries and business-model
Other
2.41k stars 188 forks source link

Integerish - exception message does not match behavior #243

Closed ErikRoelofs closed 6 years ago

ErikRoelofs commented 6 years ago

When a number fails the assertion for being "Integerish", the message received is:

Value "%s" is not an integer or a number castable to integer.

However, numbers with padded zeroes (such as "0040") are castable to integers, but don't pass this assertion. I do not know whether this is a problem with the function's behavior, or whether the message could be more accurate, but it was confusing so I want to at least point this out.

rquadling commented 6 years ago

The intergerish assertion is misbehaving at the moment. Sorry about that. Looking at trying to get it right today.