c++ - Are multiple coexistent instances of MockRepository possible? If yes under which conditions? -
Hippomox supports' This example (Visual C ++ 2010) happens to read an unused exception (Access violation space 0x00000048). It seems like a solvable problem if a good use case for it, by making the code generated in that function a bit more complicated. I have to admit that I do not see a direct instantaneous benefit, especially if two different repo jokes twice in the same ceremony, will not work anyway (because you work hard with one function Are writing) and it would be very difficult to debug problems if you combine them at some point I do not think added complexity and debugging difficulties were added by this The weight is above the mode. mock replica as many examples, as far as the compiler is concerned . Some usage cases are not possible, however, because they move towards unit test executable accidents. Let's consider the following example.
minus myacl () {} void MyCall2 () {} void MySubTest () {MockRepository mockRep2; MockRep2.ExpectCallFunc (MyCall2); MyCall2 (); } Zero MyTest () {Mock Raptory Mockery 1; MockRep1.ExpectCallFunc (MyCall); MySubTest (); my call(); }
MockRepoInstanceHolder ). What is the reason behind allowing only one instance?
ExpectCallFunc the MockRepository can oppose the examples. What is the reason behind this?
mockRep1 immediately MySubTest () , but in the first place We had a hard time understanding the problem, is there a compiled time or run-time possibility to clearly identify many such examples? The problem of root is that the function (compile time generated) functions a specific counterfeit stock. There is no place to 'tag' with and instead of counterfeit goods, it can not be grown to carry it too. This is for the holder to find duplicate stores from generated stub function.
Comments
Post a Comment