utra-robosoccer / soccer-embedded

Collection of embedded programs for an autonomous humanoid soccer robot
http://utrahumanoid.ca
32 stars 8 forks source link

Declare new mock objects per unit test (through fixture or a new declaration in each test) #176

Closed rfairley closed 5 years ago

rfairley commented 5 years ago

WIP - we might also want to do the same for UartDriver_test.cpp

Fixes #174

Requires #175 before merging (the tests now build in master so no longer required)

rfairley commented 5 years ago

Going to consider this PR done, I think we can decide to refactor the bigger unit test files UartDriver and UdpDriver later in this task https://github.com/utra-robosoccer/soccer-embedded/issues/121#issuecomment-464387891. For now, those classes are doing things correctly and refactoring into a fixture would only be a further optimization.

rfairley commented 5 years ago

Ready for review