When you're implementing an algorithm (one of the places I'm most fond of making sure I have tests), focusing on input/output testing is precisely what you want to do. Partition your inputs into different ways the code needs to deal with them and test for each partition.