Hacker News new | past | comments | ask | show | jobs | submit login

> Could yo I elaborate on this?

Think about it for a second. Imagine you have

function(bool foo, bool bar) {

   if(foo) {
      //Something
   } else {
      //Something else
   }

   if(bar) {
      //Something
   } else {
      //Something else
   }
}

If you add two unit tests that test foo(true,true) and foo(false, false) you get 100% line and branch coverage, but only hit 50% path coverage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: