How to initialize test variables using Visual Studio CppUnitTestFramework
问题 I'm writing a roboter controller class Controller in which I'm using a struct Axis for each of the 4 controllable motors. For each test I want to reset everything, so I created a pointer in the class which is changed to a new Controller before each test method. The initialisation works fine in TEST_METHOD_INITIALIZE, but once any TEST_METHOD is called the program seems reset the Axis pointers. Thanks for your help! Edit: After further analysis I have the theory, that the initialised Axis