added unit tests to VS2013 project and passed

a few things had to be modified to make the unit test pass. i'm very
surprised one of the unit tests passed in g++/unix but not in vs2013
even though there's clearly a bug.