bool operator==(Siirto& rSiirto)
{
if(from == rSiirto.from && to == rSiirto.to)
return true;
else
return false;
}
I'm in the process of improving my code and thus making it more easy to test.Unit testing is a big part of it.
Let's say the variable rSiirto == null.
Should this be an exception or just return false?
I'm thinking this is matter of taste and preference but I read that one should only
raise exceptions if the condition is exceptional so you should never raise exceptions
unless something truly exceptional has happened..
Thoughts?


Sign In
Create Account


Back to top









