maxdeliso/elevatorSim — pull request #34 by Q115 (2012-12-09 02:08:14+00:00)
Title: added a basic unit test functionality

yo, I wrote a lot more nontrivial and complex unit tests, but I can't commit them because the default constructor for all the classes beside the Building class are private.

For example, I added a person to an elevator, so I did, testElevator->addPerson(new Person(1,2)); but the code right now won't let me because it said i can't access private members, so for testing purposes I switched it to public and did unit tests from there. I used the Boost assert to see if the person were indeed added and I tried the removePerson method as well and it all worked. I can't commit those unit tests obviously because that would need the default constructors to be set to public.

I don't know the correct approach on how you want me to test those private members. But, I did wrote test cases for them and it all worked.