Unexpected behavior of assertEqual?

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Unexpected behavior of assertEqual?

Post by Ollie Saunders »

lol. Well it has to be either true or false I guess. It's not like PHP is allowed to go "can't convert boolean to integer". Funny though.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Unexpected behavior of assertEqual?

Post by Chris Corbyn »

I would think FALSE == 0 should therefore not be FALSE < -1, no? :) Anything less than -1 is a negative number. Negative numbers have a value, therefore they are TRUE. Seems wrong to me :crazy:
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Re: Unexpected behavior of assertEqual?

Post by Jenk »

positive = true, negative or no value = false

makes more sense to me. :)
Post Reply